Sujet : Re: Simple string conversion from UCS2 to ISO8859-1
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 24. Feb 2025, 08:27:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vph70o$vglc$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 23.02.2025 08:03, Kaz Kylheku wrote:
On 2025-02-22, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
LF: <any sequence of a single ASCII 0A or 0D, or both>
>
It looks like they accept not only LF, CR, CR-LF, but also LF-CR.
Is the latter of any practical relevance?
Because if Unicode people spot the slightest opportunity to add
pointless complexity to anything, they tend to pounce on it.
Given what's all collected in Unicode they've long passed the line
where one more or less character would matter. ;-)
That said; I anyway think it's good to have one standard instead of
hundreds of individual specific character sets and "codepage" variants.
Why just specify one line ending convention, when you can require the
processor of the file to watch out for four different tokens denoting
the line break?
Well, the history is (partly) understandable. Doesn't that stem from
early IT days where printers and their components got controlled by
atomic commands; CR, LF, BS [*]. Sending such a text file with CR LF
to the printer would perform the necessary printer raw commands.[**]
I think at some early point in history they should have differentiated
and standardized the file ending to use a single character.
Is it now too late given that even some RFC protocol standards specify
CR LF as ending sequence?
Janis
[*] I recall a mainframe terminal that echoed the password by sequences
of <PW-char> BS 'X' BS 'O' etc. to keep it "unreadable". Of course
you could see the PW by manually turning the "drum" during the print
process.
[**] OTOH I recall there was another control method, where the first
character of a line determined the printer control; sending a file to
the raw printer produces quite a mess.