<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CHANSI2Unicode doc in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121104#M5725</link>
    <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;Try converting to Unicode first (CHANSI2Unicode) and then from Unicode to UTF8 (CHUnicode2ANSI).&lt;/BLOCKQUOTE&gt;
It did the trick.&lt;BR /&gt;
I was wondering how they want to push char* into uchar_t*...&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Fri, 22 Feb 2013 13:45:24 GMT</pubDate>
    <dc:creator>Tomasz Marek</dc:creator>
    <dc:date>2013-02-22T13:45:24Z</dc:date>
    <item>
      <title>CHANSI2Unicode doc</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121102#M5723</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;There are few mistakes in the documentation of CHANSI2Unicode.&lt;BR /&gt;
&lt;PRE&gt;    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
    );&lt;/PRE&gt;
First of all pWChars is not wchar_t* , but uchar_t* (unsigned short).&lt;BR /&gt;&lt;BR /&gt;There is no way to get the example work as it is right now (R16.0).
&lt;BLOCKQUOTE&gt;GS::ANIS2UnicodeCacheRef cache = 0;&lt;/BLOCKQUOTE&gt;
Should read GS::CHANSI2UnicodeCacheRef.&lt;BR /&gt;p variable type is not defined.&lt;BR /&gt;&lt;BR /&gt;What is a proper way to convert a material name (const char*) to UTF8?&lt;BR /&gt;I cannot get CC_UTF8 it to work (x64 Win).&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Tomasz&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:25:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121102#M5723</guid>
      <dc:creator>Tomasz Marek</dc:creator>
      <dc:date>2023-08-02T13:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: CHANSI2Unicode doc</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121103#M5724</link>
      <description>&lt;BLOCKQUOTE&gt;Tomasz wrote:&lt;BR /&gt;What is a proper way to convert a material name (const char*) to UTF8?&lt;BR /&gt;
I cannot get CC_UTF8 it to work (x64 Win).&lt;/BLOCKQUOTE&gt;
Try converting to Unicode first (CHANSI2Unicode) and then from Unicode to UTF8 (CHUnicode2ANSI).</description>
      <pubDate>Fri, 22 Feb 2013 12:38:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121103#M5724</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2013-02-22T12:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: CHANSI2Unicode doc</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121104#M5725</link>
      <description>&lt;BLOCKQUOTE&gt;Ralph wrote:&lt;BR /&gt;Try converting to Unicode first (CHANSI2Unicode) and then from Unicode to UTF8 (CHUnicode2ANSI).&lt;/BLOCKQUOTE&gt;
It did the trick.&lt;BR /&gt;
I was wondering how they want to push char* into uchar_t*...&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 22 Feb 2013 13:45:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/CHANSI2Unicode-doc/m-p/121104#M5725</guid>
      <dc:creator>Tomasz Marek</dc:creator>
      <dc:date>2013-02-22T13:45:24Z</dc:date>
    </item>
  </channel>
</rss>

