This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13757] mbstowcs(3) unable to handle 8bit characters.
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 03 Mar 2012 13:41:43 +0000
- Subject: [Bug libc/13757] mbstowcs(3) unable to handle 8bit characters.
- Auto-submitted: auto-generated
- References: <bug-13757-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13757
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> 2012-03-03 13:41:43 UTC ---
The charmap for the C locale should definitely not be ISO-8859-anything. All
that does is encourage broken, non-portable program behavior. If you are going
to use mbrtowc and family and intend to process characters not in the portable
character set, you MUST call setlocale for the LC_CTYPE category.
The system calls you referred to (e.g. readdir and readlink) do not use any
character map. They process bytes. In any case, if you wanted the C locale to
match the filesystem's encoding, it would have to be UTF-8, not ISO-8859-1, at
least on any modern system, and I'm pretty sure that's not what you want since
you seem to be advocating for very backwards behavior...
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.