This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/18678] std::time_put<wchar_t> is broken with UTF-8 locales
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2004 12:55:17 -0000
- Subject: [Bug libstdc++/18678] std::time_put<wchar_t> is broken with UTF-8 locales
- References: <20041126002106.18678.rleigh@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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