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++/36899] Wrong char to wchar_t conversion when putting multibyte strings to wide-character streams



------- 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


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