https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #9 from ww898 <mikhail at pilin dot name> ---
#include <iostream>
#include <codecvt>
#include <string>
#include <iomanip>
int main()
{
static char const src[] = "\xE2\x82\xAC";
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
auto const dst = conv.from_bytes(src);
std::cout << std::hex << std::setw(4) << std::setfill('0') << (unsigned)
dst[0] << std::endl;
}
Output:
MSVC: 0x20ac
Clang: 0x20ac
GCC: 0xac20
P.S. http://rextester.com/PRPX46172