<?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: SingleSelList Not Displaying Japanese Text in Palette in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669883#M10499</link>
    <description>&lt;P&gt;Hi, if the ANSI characters look fine but Japanese don't, it's more likely a character encoding problem. I assume the problem is in the GS::UniString constructor.&lt;/P&gt;
&lt;P&gt;In general, raw strings in ArchiCAD are UTF-8 encoded. If in this case the name is a char*, then it can be UTF-8.&lt;/P&gt;
&lt;P&gt;In this case the GS::UniString should be constructed with the UTF-8 character encoding specification like this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::UniString uStr ((*data.paramsLib)[item - 1].name, CC_UTF8);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: Implementing an owner-drawn listbox is more complicated than implementing a simple listbox. And if you do not need an owner-drawn listbox, you can simply use the&amp;nbsp;SetTabItemText(...) member function to set content on the listbox cells and you do not have to deal with padding, text drawing and so on.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jul 2025 11:16:33 GMT</pubDate>
    <dc:creator>Miklos Vegh</dc:creator>
    <dc:date>2025-07-16T11:16:33Z</dc:date>
    <item>
      <title>SingleSelList Not Displaying Japanese Text in Palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669489#M10496</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am creating a palette that contains a SingleSelList to display object variable information—similar to the “Object Selection Settings” dialog—but when the uDescname value contains Japanese characters, it fails to display correctly. I’ve tried various approaches suggested on forums for handling Japanese and Chinese characters (such as using std::wstring), but without success. Does anyone have a solution to this issue?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NMK195_0-1752295175266.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/89446i61517B70D8F1BDEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NMK195_0-1752295175266.png" alt="NMK195_0-1752295175266.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;	// Draw Text
	TE::Font fontPlain;
	DG::GetFont(DG::Font::Large, DG::Font::Plain, &amp;amp;fontPlain);
	const double padding = fontPlain.GetCapISize() * 1.5;
	double top = padding;


	GS::UniString uStr((*data.paramsLib)[item - 1].name);
	context.DrawPlainText(uStr, fontPlain, padding, top, 0);

	std::wstring wStr = (*data.paramsLib)[item - 1].uDescname;
	GS::UniString uStr1(wStr.c_str());
	context.DrawPlainText(uStr1, fontPlain, padding, top + 20, 0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 04:42:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669489#M10496</guid>
      <dc:creator>NMK195</dc:creator>
      <dc:date>2025-07-12T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelList Not Displaying Japanese Text in Palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669808#M10497</link>
      <description>&lt;P&gt;Hi, I'd suggest you try the conversion option CC_Japanese like the following code in case of Japanese charactor:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;char* pChar = "文字"
GS::UniString str (pChar, CC_Japanese);
&lt;/LI-CODE&gt;
&lt;P&gt;HTH.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 09:27:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669808#M10497</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2025-07-16T09:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelList Not Displaying Japanese Text in Palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669883#M10499</link>
      <description>&lt;P&gt;Hi, if the ANSI characters look fine but Japanese don't, it's more likely a character encoding problem. I assume the problem is in the GS::UniString constructor.&lt;/P&gt;
&lt;P&gt;In general, raw strings in ArchiCAD are UTF-8 encoded. If in this case the name is a char*, then it can be UTF-8.&lt;/P&gt;
&lt;P&gt;In this case the GS::UniString should be constructed with the UTF-8 character encoding specification like this:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::UniString uStr ((*data.paramsLib)[item - 1].name, CC_UTF8);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: Implementing an owner-drawn listbox is more complicated than implementing a simple listbox. And if you do not need an owner-drawn listbox, you can simply use the&amp;nbsp;SetTabItemText(...) member function to set content on the listbox cells and you do not have to deal with padding, text drawing and so on.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 11:16:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/669883#M10499</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2025-07-16T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: SingleSelList Not Displaying Japanese Text in Palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/670020#M10501</link>
      <description>&lt;P&gt;Thank you for your answer! Actually, I had already tried using that syntax, but the displayed content still had font issues. Later, I switched to displaying it similar to the AttributeListDialog example, and it worked properly.&lt;/P&gt;
&lt;P&gt;However, now I have a new problem: in the API, how can I retrieve the list of values defined in a GDL object?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NMK195_0-1752720309192.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/89651iE20F4CCA10CF3A7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="NMK195_0-1752720309192.png" alt="NMK195_0-1752720309192.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 15:03:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SingleSelList-Not-Displaying-Japanese-Text-in-Palette/m-p/670020#M10501</guid>
      <dc:creator>NMK195</dc:creator>
      <dc:date>2025-07-18T15:03:13Z</dc:date>
    </item>
  </channel>
</rss>

