Hello,
I'm working with part of a complex system that needs to parse XML containing foreign languages. For the time being, I just need to test sending strings with foreign characters to our graphics components.
At the moment, we're handling UTF-8 strings (as char*) instead of a true multi-byte type. I would like to be able to use wcstombs() to convert some sample text for testing. However, if I do something like:
I get: "error: converting to execution character set: Invalid argument", on the first line. The french letter is the problem.
The question is, how do I get foreign characters into my string for testing? Do I need to use hex values? U+ values?
Any help is appreciated.
I'm working with part of a complex system that needs to parse XML containing foreign languages. For the time being, I just need to test sending strings with foreign characters to our graphics components.
At the moment, we're handling UTF-8 strings (as char*) instead of a true multi-byte type. I would like to be able to use wcstombs() to convert some sample text for testing. However, if I do something like:
Code:
wchar_t* src = L"publicité";
size_t sz = wcslen(src);
char dest[sz]
memset(dest, '\0', sz);
wcstombs(dest, src, sz);
I get: "error: converting to execution character set: Invalid argument", on the first line. The french letter is the problem.
The question is, how do I get foreign characters into my string for testing? Do I need to use hex values? U+ values?
Any help is appreciated.