This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 libstdc++/18678] std::time_put<wchar_t> is broken with UTF-8 locales


------- Additional Comments From pcarlini at suse dot de  2004-11-26 12:55 -------
> I expected valid UTF-8 in both cases, since this is what the locale codeset
> specifies.  I'm not sure what encoding wchar_t would be using, but I assumed I
> would get readable output (maybe I am wrong about that?). 

In case of wchar_t output, I don't think you have any reason to expect a 
readable output.
 
>                                                            It looks like the
> "wide" output is a different encoding, but for some reason has not affected
> the  7-bit ASCII range (I would have expected something like padding with \0
> if it was outputting UCS-4).

I should double check, really, but I'm pretty sure that libc wcsftime (and 
therefore libstdc++) just outputs wchar_t in the internal, UCS-4 encoding
(which is not supposed to be readable).

Paolo.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18678


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