WideCharToMultiByte for the conversion.
Any requirements or restrictions of this API apply here.
OEMCP, the system's OEM code page is used.
ACPCONSOLEMACCPOEMCPSYMBOLTHREAD_ACP
UTF7UTF8 instead).
UTF8COMPOSITECHECKe is the base
character and the accent grave mark is the nonspacing character.
SEPCHARS had been specified.
DEFAULTCHARDISCARDNSSEPCHARSERR_INVALID_CHARSUTF8 or 54936.
NO_BEST_FIT_CHARS.!USEDDEFAULTCHAR.true if the
defaultchar was used
during the conversion, and to .false if it was not..!TEXTCOMPOSITECHECK was not specified
when one of the flags DEFAULTCHAR, DISCARDNS,
or SEPCHARS was specified
ERR_INVALID_CHARS was specified
with a codepage other than
UTF8 or 54936
ERR_INVALID_CHARS was specified with a
codepage UTF8 or 54936
-- two steps to convert a string from one code page to another
string = '64 C3A9 6A C3A0 20 76 75'x -- UTF-8 encoded
-- step 1: convert the string from its codepage to UTF-16
call SysToUnicode string, "UTF8", , out.
-- step 2: convert the UTF-16 string to the desired output codepage
call SysFromUnicode out.!text, "CONSOLE", , , out.
say out.!text -- déjà vu