[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnu-libiconv] [PATCH] Support nl_langinfo (CODESET) correctly o
From: |
Bruno Haible |
Subject: |
Re: [bug-gnu-libiconv] [PATCH] Support nl_langinfo (CODESET) correctly on OS/2 |
Date: |
Tue, 06 Aug 2019 22:05:46 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-157-generic; KDE/5.18.0; x86_64; ; ) |
> >> + { "CP1200", "UCS-2" },
> >
> > UCS-2 cannot be used as a locale encoding, since it is not ASCII
> > compatible. This
> > cannot work.
> >
>
> setlocale() on kLIBC accepts "IBM-1200", "UCS-2" and so on.
> Nevertheless, UCS-2 should be removed ?
The locale encoding is the encoding of strings such as
- the arguments of main(),
- file names,
- text read from stdin,
- text read from stdout.
Applications use 'char *' (with implicit length as determined by strlen)
for such text. But 'char *' and strlen don't work with UCS-2 encoded
text (because it contains many NUL bytes).
Bruno