I have a need to convert a unicode string into the appropriate ANSI encoding.
Purpose is to insert the ANSI string into an old application, which with proper encoding selected, displays the same character.
This seems like a simple job.
I have the following:
My expected outcome is (using my default ANSI, Western Europe codepage):
Problem is that I can ONLY get question marks, or empty string, no matter when I put as parameter for the WideChartoMultiByte...
What am I missing here ?
How can I tell the WideCharToMultiByte function which encoding I would like ?
So far I am looking for
UTF8 ==> GBK (or GB2312) for Chinese/Simplified
UTF8==> ANSI (Hebres, Win1255)
UTF8==> KoreanJohab
I can't be the only person ever to do this ?
The conversion works perfectly using sofware such as "Charco" (freeware), but I would love to have this natively in my script.
Purpose is to insert the ANSI string into an old application, which with proper encoding selected, displays the same character.
This seems like a simple job.
I have the following:
[ autoit ]
#include <WinAPI.au3> $string = "שָׁלוֹם" ; shalom in Hebrew $out = _WinAPI_WideCharToMultiByte($string) ConsoleWrite($out & @CRLF )
My expected outcome is (using my default ANSI, Western Europe codepage):
ùÈÑìåÉíwhich when encoded in Win1255 ("Hebrew") correctly displays שָׁלוֹם.
Problem is that I can ONLY get question marks, or empty string, no matter when I put as parameter for the WideChartoMultiByte...
What am I missing here ?
How can I tell the WideCharToMultiByte function which encoding I would like ?
So far I am looking for
UTF8 ==> GBK (or GB2312) for Chinese/Simplified
UTF8==> ANSI (Hebres, Win1255)
UTF8==> KoreanJohab
I can't be the only person ever to do this ?
The conversion works perfectly using sofware such as "Charco" (freeware), but I would love to have this natively in my script.