问题
Im getting the following assert when calling std::isgraph:
_ASSERTE(c >= -1 && c <= 255);
It's a unicode built on Windows platform, but the locale is reported as "c". What should I set the locale to in order to support unicode ?
回答1:
Nothing.
std::isgraph
has nothing to do with Unicode.
In particular, it cannot support any character value out of the range you've mentioned.
You could pass it individual bytes of a [say, UTF-8] codepoint, sure, but that wouldn't tell you anything.
It's simply not designed for what you're trying to do.
Use a proper library like ICU instead.
来源:https://stackoverflow.com/questions/59138426/stdisgraph-asserts-how-to-fix