4 ms·
Utf-8 is instant failure for embedded targets, and essentially guarantees the failure of any C replacement.
by 95014_refugee 5y ago
Utf-8 is instant failure for embedded targets, and essentially guarantees the failure of any C replacement.
- flohofwoe 5y agoHuh? Please explain if you don't mind. UTF-8 is completely backward compatible with 7-bit ASCII, so if you don't need international characters everything remains exactly the same, and if you need international characters, strings are still just regular "bags of bytes". The only difference (for international strings) is that the number of bytes in the strings isn't the same as the number of characters (or rather UNICODE code points). But that's only relevant if you actually need to process a string down on the character level. Most CRT ASCII string functions work just fine on UTF-8 data, even strtok() if the delimiters are 7-bit ASCII.