4 ms·
Unicode is much more complex than that. For example, how would you then convert that string to uppercase, or truncate it? For Unicode strings in C++, you can e
by millstone 12y ago
Unicode is much more complex than that. For example, how would you then convert that string to uppercase, or truncate it?
For Unicode strings in C++, you can either limp along with the wchar_t support, or leverage something like ICU. Neither is especially easy.
- zanny 12y agoIf you want string manipulation in C++ you need an external library no matter what encoding you use. Also, std::toupper inherits the system locale (or whatever you set it to), so if it is utf8 it would do proper utf uppercase conversions. You need to parse per character though, and that depends on the locale again.