<?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: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584465#M9100</link>
    <description>&lt;P&gt;Or if you have utf8 characters in a file for example, you can construct UniString with this constructor:&lt;/P&gt;
&lt;P&gt;char* utf8Chars;&lt;/P&gt;
&lt;P&gt;GS::UniString uStr (utf8Chars, CC_UTF8);&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 07:42:46 GMT</pubDate>
    <dc:creator>Miklos Vegh</dc:creator>
    <dc:date>2024-01-18T07:42:46Z</dc:date>
    <item>
      <title>GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese characters.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584122#M9087</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have encountered an issue with garbled Chinese characters.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I have tried many methods but have not been successful, and the Chinese characters will become '?'&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;Or some strange symbols.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/52000iA180434FBC1A783C/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac.png" alt="ac.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ac2.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/51999i2A6B5ECF09E77F1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="ac2.png" alt="ac2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please provide me with some ideas, thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 09:29:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584122#M9087</guid>
      <dc:creator>luna</dc:creator>
      <dc:date>2024-09-17T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584338#M9095</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Of course UniString supports chinese and other languages also. I think that the problem here is the conversion between utf16 and char types.&lt;/P&gt;
&lt;P&gt;I suggest using std::wstring instead of std::string in the code.&lt;/P&gt;
&lt;P&gt;UniString can be constructed from utf16 character array with the UniString (const UniChar::Layout* uStr) constructor, so you can convert std::wstring to UniString easily.&lt;/P&gt;
&lt;P&gt;UniString supports the 8-bit utf8 characters also if needed.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 14:15:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584338#M9095</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2024-01-17T14:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584419#M9097</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, can you provide an example &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;std::string str = "D:/ACFiles/中文测试(Chinese Test)";&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;such as, how to convert &lt;STRONG&gt;'str'&lt;/STRONG&gt; in the above code to GS:: UniString without garbled characters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;After trying to convert to wstring, it still doesn't work, just starting from '&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;Transformed into some strange symbols.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 02:48:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584419#M9097</guid>
      <dc:creator>luna</dc:creator>
      <dc:date>2024-01-18T02:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584461#M9099</link>
      <description>&lt;P&gt;I did not compile this code, but I think something like this:&lt;/P&gt;
&lt;PRE&gt;std::wstring wStr = L("中文测试");&lt;BR /&gt;GS::UniString uStr (wStr.c_str());&lt;/PRE&gt;
&lt;P&gt;The L() macro forces those characters to compile as utf16.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 07:38:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584461#M9099</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2024-01-18T07:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584465#M9100</link>
      <description>&lt;P&gt;Or if you have utf8 characters in a file for example, you can construct UniString with this constructor:&lt;/P&gt;
&lt;P&gt;char* utf8Chars;&lt;/P&gt;
&lt;P&gt;GS::UniString uStr (utf8Chars, CC_UTF8);&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 07:42:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584465#M9100</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2024-01-18T07:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584470#M9101</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I succeeded &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I always thought it was an issue with GS:: UniString, but the problem was that I had previously switched between std:: string and std:: wstring multiple times. xD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 08:26:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584470#M9101</guid>
      <dc:creator>luna</dc:creator>
      <dc:date>2024-01-18T08:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: GS::UniString Does not support Chinese? I have encountered an issue with garbled Chinese charact</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584475#M9102</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 08:58:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/GS-UniString-Does-not-support-Chinese-I-have-encountered-an/m-p/584475#M9102</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2024-01-18T08:58:12Z</dc:date>
    </item>
  </channel>
</rss>

