I have a Java application in which I wish to call to another C++ application.
For that, in my Java I call
Runtime.exec(args)
My arg is “HelloWorldèçàœ”.
When my C++ recives this arg, it sees it as “HelloWorld????”. I looked in memory map and the characters èçàœ appear as 3f 3f 3f 3f.
( In addition, I am not sure that this is relevant, but when I compiled my C++, I have chosen the option: “Character Set = Use Multi-Byte Character Set” (in Properties->General). )
Q: How can I pass such a param from Java to C++?
Thanks
It’s probably because of the encodings you’re using on both sides. Try to ensure that your “args” is stored as the UTF-8 string in Java, and try to read is as UTF-8 string in your C++ code.
Othewise Java uses platform’s default encoding, which may be not even supporting these “èçàœ” characters.