I have to copy a string read from a database into a char buffer replacing the accented characters with the hex values of the corresponding characters of WinAnsiEncoding charset.
I'm working with the last version of debian and I'm using a WinAnsiEncoding encodig because I must use the function to write a pdf with libharu but I don't know whether it's really matter.
Anyway, solved the problem next I can encode in ISO8859-16 or other.
Libharu can use this encoding:
"StandardEncoding",
"MacRomanEncoding",
"WinAnsiEncoding",
"ISO8859-2",
"ISO8859-3",
"ISO8859-4",
"ISO8859-5",
"ISO8859-9",
"ISO8859-10",
"ISO8859-13",
"ISO8859-14",
"ISO8859-15",
"ISO8859-16",
"CP1250",
"CP1251",
"CP1252",
"CP1254",
"CP1257",
"KOI8-R",
"Symbol-Set",
"ZapfDingbats-Set"
Because my first need is to replace only the characters èéàùòì and because if call the function textOut with a buffers with the corresponding values, I thought that the fast solution was to copy the string into the buffer and do the replacing. It's the first time I work with multibyte characters.
This may or may not help, but have you tried using single quotes instead of double quotes? The specific characters you are using aren't really multi-byte characters.