Re: g++ off-by-one bug in utf16 conversion

2014-10-27 Thread Joseph S. Myers
This is bug 41698. Please send a patch to gcc-patches, including the addition of a testcase to the testsuite. -- Joseph S. Myers jos...@codesourcery.com

g++ off-by-one bug in utf16 conversion

2014-10-25 Thread John Schmerge
Hey guys, I came across this bug earlier today in implementing some unit tests for utf8/16 conversions... The following c++ fragment gives the wrong result: int main() { char16_t s[] = u"\u"; std::cout << std::hex << s[0] << " " << s[1] << std::endl; } it prints: d7ff dfff where as it