codeset problems in wprintf and wcsftime
Sat Feb 20 16:42:00 GMT 2010
> another alternative to the solutions you outlined
> might be to store those strings as wchar versions only, to be used
> directly in wprintf and converted to the LC_CTYPE character set when
> needed in printf. That way, the user would always get readable output.
>> - Store the charset not only for LC_CTYPE, but for each localization
>> category, and provide a function to request the charset.
>> This also requires to store the associated multibyte to widechar
>> conversion functions, obviously, and to call the correct functions
>> from wprintf and wcftime.
>> - Redefine the locale data structs so that they contain multibyte and
>> widechar representations of all strings. Use the multibyte strings
>> in the multibyte functions, the widechar strings in the widechar
Actually, there's a fourth alternative: do nothing.
"If different character sets are used by the locale categories, the
results achieved by an application utilizing these categories are
(So why did they even allow different charsets to be specified for
More information about the Newlib