how to convert a single-byte encoded string into UTF-32?
-
11-06-2021 - |
Question
I know code page of the input string, for example CP 852, now I need to make it to the universal UCS-4 format. What function I should use. I'm doing it under WinXP with MingW.
Solution
If you are really sure you want UTF-32 encoded strings (and I suggest doing some research first - it is almost always a bad choice), you can start with MultiByteToWideChar function to convert the CP 852 encoded string to UTF-16, and then write your own function to convert UTF-16 to UTF-32.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow