[Bug libgcc/79280] mbtowc converts only one byte

2017-01-31 Thread janturon at email dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79280 --- Comment #2 from Jan Turoň --- setlocale does some change, but still not right: My system locale is cs_CZ, the default codepage is 1250, console uses 852. I Have these results, considering this code: const char *str = "ř"; mbtowc(&(a.w),

[Bug libgcc/79280] mbtowc converts only one byte

2017-01-31 Thread janturon at email dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79280 Jan Turoň changed: What|Removed |Added Resolution|INVALID |WORKSFORME

[Bug libgcc/79280] New: mbtowc converts only one byte

2017-01-30 Thread janturon at email dot cz
Assignee: unassigned at gcc dot gnu.org Reporter: janturon at email dot cz Target Milestone: --- mbtowc doesn't seem to work with chars longer than one byte, see the following snippet: int u8toint(const char* str) { if(!(*str&128)) return *str; unsigned char c = *str, bytes