Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Converting UniString to string with Hebrew characters doesn’t work

Anonymous
Not applicable
Hello

I am trying to convert a UniString which has Hebrew characters in it (it looks good on debug), to const char or string,.
The UniString with Hebrew characters looks good but the conversion (.toxstr().get()) kills the Hebrew characters (they become jibrish).
That’s a real problem for me.

Please help!

Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
I recommend you to use IO::FileSystem::Copy method instead:
#include "FileSystem.hpp"

IO::Location from (uniString1);
IO::Location to (uniString2);
IO::fileSystem.Copy (from, to);
It's easier than converting

View solution in original post

3 REPLIES 3
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

Why do you want to convert the GS::UniString object to const char* or std::string?
Could you show us please the relevant part of your code?

Regards,
Tibor
Anonymous
Not applicable
Tibor wrote:
Hi,

Why do you want to convert the GS::UniString object to const char* or std::string?
Could you show us please the relevant part of your code?

Regards,
Tibor
Hi
I want to use CopyFile (c++ function) and it only works with string..
Solution
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
I recommend you to use IO::FileSystem::Copy method instead:
#include "FileSystem.hpp"

IO::Location from (uniString1);
IO::Location to (uniString2);
IO::fileSystem.Copy (from, to);
It's easier than converting