glibc strftime multibyte problems with TOLOWER, TOUPPER

Paul Eggert eggert@twinsun.com
Wed Sep 2 20:56:00 GMT 1998


The uses of TOLOWER and TOUPPER in strftime.c all assume unibyte
characters, and will mess up in the presence of some popular multibyte
encodings like Shift-JIS.  This should probably be put into the glibc
BUGS file somewhere.  Fixing it isn't trivial as it will require
converting to wide characters, changing their case with
towupper/towlower, and then converting back, and this can change the
length of the multibyte string.



More information about the Libc-alpha mailing list