This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13757] mbstowcs(3) unable to handle 8bit characters.

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:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]