This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

Re: codeset problems in wprintf and wcsftime


Corinna Vinschen:
> The advantage of having the strings available in wchar_t representation
> would be that the wcsftime and wprintf functions don't have to worry
> about charsets at all. ÂIn contrast to the current solution which
> requires a conversion from multibyte which means, you have to *know*
> which source charset was being used when creating these strings. ÂRight
> now they only have information about one charset, which is the LC_CTYPE
> charset.
>
> In Glibc, as well as on Windows, the localization strings are originally
> stored in Unicode on disk, and Glibc stores the strings internally in multibyte
> and wchar_t representation.

I think removing the need for wprintf and wcsftime to convert to
wchar_t every time is a good reason for adding the wchar_t
representation. And glibc compatibility is a nice bonus, even though
mixing charsets just isn't a good idea.

(Also, good point about not wanting to add conversions from wchar_t to
multibyte to printf and strftime.)

Andy


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