Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top