This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/36899] Wrong char to wchar_t conversion when putting multibyte strings to wide-character streams
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2008 17:09:22 -0000
- Subject: [Bug libstdc++/36899] Wrong char to wchar_t conversion when putting multibyte strings to wide-character streams
- References: <bug-36899-16499@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from paolo dot carlini at oracle dot com 2008-07-22 17:09 -------
Really, there isn't much we can do here: according to the standard
(27.6.2.5.4/4) each char is widened *individually* (via out.widen), and some of
the chars in the character-literal at issue (not belonging to the basic source
character set) *as represented internally* by the compiler (you can see that in
a debugger, nothing to do with the library of course) cannot be widened
uniquely (via, eg, btowc). Then, the next insertion (equivalent to a series of
putwc in this case in our implementation, see libstdc++/35353, but this is
really an unrelated issue) ends up inserting WEOFs.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36899