License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

String into UniString?

Anonymous
Not applicable
How can I convert a string to UniString?

Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
leilei
Enthusiast
Hi, you can do this:
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str());

View solution in original post

3 REPLIES 3
Solution
leilei
Enthusiast
Hi, you can do this:
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str());
leilei
Enthusiast
Sometimes you need to set character types.When I read the file path through string, I need to do this when I convert to unistring.
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str(),CC_SimpChinese);

I want to use Hangul.

 

std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str(),???????);

 

I find that

CC_Korean in CH.hpp

in API Development Kit 26.3000\Support\Modules\GSRoot

 

Thank you so much ^^

AC27 on window 11