https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #9 from ww898 ---
#include
#include
#include
#include
int main()
{
static char const src[] = "\xE2\x82\xAC";
std::wstring_convert> conv;
auto const dst = conv.from_bytes(src);
std::cout << std::hex << std::setw(4)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #7 from ww898 ---
Yes, I have: https://github.com/ww898/utf-cpp.
To make errors please uncomment here:
https://github.com/ww898/utf-cpp/blob/master/test/utf_converters_test.cpp#L781
P.S. It is possible to use no library version of b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #5 from ww898 ---
The question about std::little_endian is still alive...
MSVC 2013/2015/2017, Clang 3.4/3.8 work on little endian computers x86/x86_64
and have little endian by default.
http://en.cppreference.com/w/cpp/locale/codecv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #3 from ww898 ---
Repro:
std::wstring_convert> _Conv;
std::string _Src("\xEF\xBF\xBF");
auto const _Dst = _Conv.from_bytes(&*_Src.begin(), &*_Src.end());
if (_Dst.size() == 2)
std::cout << std::hex << (unsigned)_Dst[0] << ":" << (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #2 from ww898 ---
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.2 LTS
Release:16.04
Codename: xenial
$ uname -a
Linux 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x8
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: mikhail at pilin dot name
Target Milestone: ---
Hi,
I found two issues in std::codecvt_utf8_utf16 for GCC v5.4 (Clang v3.8 has no
issues here):
1. \xEF\xBF\xBF (UTF8) convered to \xD7FF\xDFFF (UTF16), but should be