2 ms·
No not really. wchar_t is not Unicode. It's whatever the current locale's codeset and encoding demand. No, just say no to all of this. Instead: - use UTF
by cryptonector 5y ago
No not really. wchar_t is not Unicode. It's whatever the current locale's codeset and encoding demand. No, just say no to all of this.
Instead:
- use UTF-8 locales
- use a Unicode library for all things Unicode
- make your own ctype for when it's Just ASCII
- kazinator 5y agoI don't know who you think said wchar_t is Unicode, but it wasn't me. In a given locale, you can almost certainly regard wchar_t as being a continuation of the range of unsigned char. If you want to know whether the value UCHAR_MAX + 1 is alpha-numeric, you can't pass that to isalnum, but if that value is in the range of wint_t, you can pass it to iswalnum. For values 0 to UCHAR_MAX, it would be surprising if isalnum and iswalnum produced different results.