I'm having problems returning Unicode strings from C++ to C#.
I have this in my .i file:
std::wstring myTestFunc(const std::wstring & s)
When I call it from C# with a string containing Unicode characters:
char unicodechar = '\u73a9'; // Chinese character for father, man
string unicodeString = unicodechar.ToString();
string s = trimPINVOKE.myTestFunc(unicodeString);
, I find that the Unicode character has been replaced with '?'.
Am I using std::wstring incorrectly here? How would I make it work?