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
* [Bug libstdc++/66855] codecvt wrong endianness in UTF-16 conversions 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 ` redi at gcc dot gnu.org 2015-07-13 20:10 ` redi at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2015-07-13 20:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66855 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Mon Jul 13 20:07:48 2015 New Revision: 225748 URL: https://gcc.gnu.org/viewcvs?rev=225748&root=gcc&view=rev Log: PR libstdc++/66855 * src/c++11/codecvt.cc (__codecvt_utf8_utf16_base::do_in): Override endianness bit in mode. * testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: New. Added: trunk/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/src/c++11/codecvt.cc ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/66855] codecvt wrong endianness in UTF-16 conversions 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 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2015-07-13 20:10 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66855 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.3 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed on trunk so far. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/66855] codecvt wrong endianness in UTF-16 conversions 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 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2015-09-03 15:11 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66855 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Thu Sep 3 15:10:32 2015 New Revision: 227452 URL: https://gcc.gnu.org/viewcvs?rev=227452&root=gcc&view=rev Log: Backport PR libstdc++/66855 fix from mainline 2015-07-13 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/66855 * src/c++11/codecvt.cc (__codecvt_utf8_utf16_base::do_in): Override endianness bit in mode. * testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: New. Added: branches/gcc-5-branch/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc Modified: branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/src/c++11/codecvt.cc ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/66855] codecvt wrong endianness in UTF-16 conversions 2015-07-13 11:19 [Bug libstdc++/66855] New: codecvt wrong endianness in UTF-16 conversions delrieutheo at gmail dot com ` (2 preceding siblings ...) 2015-09-03 15:11 ` redi at gcc dot gnu.org @ 2015-09-03 15:12 ` redi at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: redi at gcc dot gnu.org @ 2015-09-03 15:12 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66855 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed for 5.3 and 6.0 ^ 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).