<?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: Get the names of layouts at Cyrillic in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214917#M5836</link>
    <description>Does "Session Reporter" supports UNICODE?&lt;BR /&gt;
&lt;BR /&gt;
Have you tried using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;OutputDebugStringW()&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;_swprintf()&lt;E&gt;&lt;/E&gt; instead of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_WriteReport()&lt;E&gt;&lt;/E&gt;?</description>
    <pubDate>Wed, 11 Dec 2013 09:45:05 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2013-12-11T09:45:05Z</dc:date>
    <item>
      <title>Get the names of layouts at Cyrillic</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214916#M5835</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi!&lt;BR /&gt;I try to receive names of layouts at Cyrillic (Russian &amp;amp; Ukrainian symbols), but when i output names to "Session Reporter", I receive garbage like &lt;BR /&gt;@825B. &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_cry.gif" border="0" /&gt; &lt;BR /&gt;&lt;BR /&gt;Look attachment for more information.&lt;BR /&gt;1 - Layouts names at "Navigator - Layout Book"&lt;BR /&gt;2 - Output to "Session Reporter"&lt;BR /&gt;&lt;BR /&gt;Look at my code here: &lt;A href="http://pastebin.com/eHEGCT0g" target="_blank" rel="noopener"&gt;http://pastebin.com/eHEGCT0g&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Advance thanks &lt;IMG style="display: inline;" src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" border="0" /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/71021i7B2AABC81EA9CC18/image-size/large?v=v2&amp;amp;px=999" border="0" alt="attach.png" title="attach.png" /&gt;</description>
      <pubDate>Tue, 01 Aug 2023 16:55:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214916#M5835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T16:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get the names of layouts at Cyrillic</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214917#M5836</link>
      <description>Does "Session Reporter" supports UNICODE?&lt;BR /&gt;
&lt;BR /&gt;
Have you tried using &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;OutputDebugStringW()&lt;E&gt;&lt;/E&gt; and &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;_swprintf()&lt;E&gt;&lt;/E&gt; instead of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_WriteReport()&lt;E&gt;&lt;/E&gt;?</description>
      <pubDate>Wed, 11 Dec 2013 09:45:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214917#M5836</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2013-12-11T09:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get the names of layouts at Cyrillic</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214918#M5837</link>
      <description>Hi,   &lt;BR /&gt;
   &lt;BR /&gt;
The name has unicode characters (GS::uchar_t), but you casted them to normal characters (char). That's why you lost cyril symbols and get garbage.   &lt;BR /&gt;
   &lt;BR /&gt;
Instead of this code:   
&lt;PRE&gt;char* name = new char[API_UniLongNameLen];   
for(GSIndex i = 0; i &amp;lt; API_UniLongNameLen; i++)   
{   
        name&lt;I&gt; = (char)(api_dbPars.name&lt;I&gt;);   
        if((char)api_dbPars.name&lt;I&gt; == '\0') { break; }   
}   
ACAPI_WriteReport((char*)(name), false);   
delete[] name;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;   &lt;BR /&gt;
   &lt;BR /&gt;
Please use the following:   
&lt;PRE&gt;GS::UniString name (api_dbPars.name);   
ACAPI_WriteReport(name.ToCStr ().Get (), false);&lt;/PRE&gt;   &lt;BR /&gt;
   &lt;BR /&gt;
It's much shorter and works great. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;   &lt;BR /&gt;
   &lt;BR /&gt;
Best Regards,   &lt;BR /&gt;
Tibor Lorántfy</description>
      <pubDate>Fri, 13 Dec 2013 12:27:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Get-the-names-of-layouts-at-Cyrillic/m-p/214918#M5837</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2013-12-13T12:27:44Z</dc:date>
    </item>
  </channel>
</rss>

