BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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
Learn and get certified!