Recent

Author Topic: Any problem using Char(127) as delimiter?  (Read 1226 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1738
Any problem using Char(127) as delimiter?
« on: September 04, 2021, 07:42:19 am »
I'm thinking using #127 as delimiter for TStringList, because this character seems not used in GUI environments. It is called DEL in ASCII table. I tested with a paragraph of Korean UTF-8 characters and found no problem (the text is not long enough, but I assume that char 127 is not used as character code for English and Korean at least).

Currently I'm on Windows 10. Is there any problem with other character sets or Linux? 

MarkMLl

  • Hero Member
  • *****
  • Posts: 8534
Re: Any problem using Char(127) as delimiter?
« Reply #1 on: September 04, 2021, 11:04:14 am »
I've not seen it being used, but would not be in the least surprised if there are input handlers which treat it as a synonym for <Backspace>.

I'd suggest taking a look at https://en.wikipedia.org/wiki/Unit_Separator and considering either US (which is explicitly mentioned in the context of Linux) or one of RS/GS/FS... you might even find that AWK etc. has blessed one or more of those with interpretations compatible with your plans.

Later: AWK and Perl document FS and RS /variables/, but the content's normally something like space and NL respectively. I think one of those defined separators would still be my choice unless something else came up.

MarkMLl
« Last Edit: September 04, 2021, 12:38:12 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

egsuh

  • Hero Member
  • *****
  • Posts: 1738
Re: Any problem using Char(127) as delimiter?
« Reply #2 on: September 04, 2021, 11:16:54 am »
 Wow. There has been review already.  It’ll be really helpful. Thanks a lot.

 

TinyPortal © 2005-2018