CHANSI2Unicode doc
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-02-22
11:38 AM
- last edited on
2023-08-02
03:25 PM
by
Doreena Deng
2013-02-22
11:38 AM
Hi,
There are few mistakes in the documentation of CHANSI2Unicode.
There is no way to get the example work as it is right now (R16.0).
p variable type is not defined.
What is a proper way to convert a material name (const char*) to UTF8?
I cannot get CC_UTF8 it to work (x64 Win).
Thanks
Tomasz
There are few mistakes in the documentation of CHANSI2Unicode.
long CHANSI2Unicode ( const char* pChars, // string to convert long nChars, // number of bytes in string wchar_t* pWChars, // wide-char buffer long maxWChars, // wide char buffer length GSCharCode charCode = CC_Default // Character codepage of input CHANIS2UnicodeCacheRef* cache = NULL // can be used to cache conversion result, if called twice );First of all pWChars is not wchar_t* , but uchar_t* (unsigned short).
There is no way to get the example work as it is right now (R16.0).
GS::ANIS2UnicodeCacheRef cache = 0;Should read GS::CHANSI2UnicodeCacheRef.
p variable type is not defined.
What is a proper way to convert a material name (const char*) to UTF8?
I cannot get CC_UTF8 it to work (x64 Win).
Thanks
Tomasz
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-02-22 01:38 PM
2013-02-22
01:38 PM
Tomasz wrote:Try converting to Unicode first (CHANSI2Unicode) and then from Unicode to UTF8 (CHUnicode2ANSI).
What is a proper way to convert a material name (const char*) to UTF8?
I cannot get CC_UTF8 it to work (x64 Win).
Ralph Wessel BArch
Central Innovation
Central Innovation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-02-22 02:45 PM
2013-02-22
02:45 PM
Ralph wrote:It did the trick.
Try converting to Unicode first (CHANSI2Unicode) and then from Unicode to UTF8 (CHUnicode2ANSI).
I was wondering how they want to push char* into uchar_t*...
Thanks!