Note on encodings (and locales) with shift state

Joseph Myers joseph@codesourcery.com
Tue May 7 15:51:00 GMT 2019


On Tue, 7 May 2019, Florian Weimer wrote:

> > * In ALL locales, the <ctype.h> functions only recognize ASCII
> >   characters (this is a consequence of narrow C strings always being
> >   UTF-8; only ASCII characters fit in a single 'char' anymore) and the
> >   <wctype.h> functions' behavior is locale-invariant and defined
> >   strictly in terms of Unicode character properties.  LC_CTYPE blocks
> >   in locale definition files are either ignored or rejected (with the
> >   possible exception of transliteration specs).
> 
> I think we should do this for isidigt and a few other functions anyway.
> They really do not have to be locale-sensitive because a
> C-conforming/POSIX-conforming locale cannot change the tables anyway.

toupper / tolower in single-byte locales, and towupper / towlower in 
general, however, do have to be locale-sensitive to behave correctly in 
Turkish / Azerbaijani / ... (tr_TR and locales with 'copy "tr_TR"' in 
LC_CTYPE) locales.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list