public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/66855] New: codecvt wrong endianness in UTF-16 conversions
@ 2015-07-13 11:19 delrieutheo at gmail dot com
  2015-07-13 20:08 ` [Bug libstdc++/66855] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: delrieutheo at gmail dot com @ 2015-07-13 11:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66855

            Bug ID: 66855
           Summary: codecvt wrong endianness in UTF-16 conversions
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: delrieutheo at gmail dot com
  Target Milestone: ---

Created attachment 35965
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35965&action=edit
The buggy one

There is a problem with codecvt, the facet codecvt_utf8_utf16 should do
big-endian conversions with default template arguments.

However this is the output I get linking with libstdc++-5.1.1 :

UTF-16

[b098] [b294] [d0dc] [c624] 

UTF-16 to UTF-8

[eb] [82] [98] [eb] [8a] [94] [ed] [83] [9c] [ec] [98] [a4] 

Converting back to UTF-16

[98b0] [94b2] [dcd0] [24c6]

The same code gives the expected result on OS X with libc++ and on Windows.

When I specify the third template argument of codecvt_utf8_utf16 with
std::little_endian, it gives the expected output.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-03 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 11:19 [Bug libstdc++/66855] New: codecvt wrong endianness in UTF-16 conversions delrieutheo at gmail dot com
2015-07-13 20:08 ` [Bug libstdc++/66855] " redi at gcc dot gnu.org
2015-07-13 20:10 ` redi at gcc dot gnu.org
2015-09-03 15:11 ` redi at gcc dot gnu.org
2015-09-03 15:12 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).