This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
glibc strftime multibyte problems with TOLOWER, TOUPPER
- To: libc-alpha@cygnus.com
- Subject: glibc strftime multibyte problems with TOLOWER, TOUPPER
- From: Paul Eggert <eggert@twinsun.com>
- Date: Wed, 2 Sep 1998 18:42:27 -0700 (PDT)
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.