IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
How to display non-ascii characters in menus ?
lowzoom
post Nov 1 2011, 02:21
Post #1





Group: Members
Posts: 10
Joined: 31-October 11
Member No.: 94819



I find I can't display Chinese simply by passing plain char arrays as arguments.
I've tried some APIs in the string8_impl.h and the utf8.cpp file, but didn't work.
How can I display non-ascii characters in the UI ? (such as menus, console, popup_message and so on)

Thanks.
Go to the top of the page
+Quote Post
foosion
post Nov 1 2011, 14:56
Post #2





Group: FB2K Moderator (Donating)
Posts: 4439
Joined: 24-February 03
Member No.: 5153



Most APIs in foobar2000 accept and return strings encoded in UTF-8. When you want to display an string constant with non-ASCII characters, you can define it as L"Hello World!" and use the string_utf8_from_wide utility class from the SDK.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
lowzoom
post Nov 2 2011, 01:00
Post #3





Group: Members
Posts: 10
Joined: 31-October 11
Member No.: 94819



QUOTE (foosion @ Nov 1 2011, 14:56) *
Most APIs in foobar2000 accept and return strings encoded in UTF-8. When you want to display an string constant with non-ASCII characters, you can define it as L"Hello World!" and use the string_utf8_from_wide utility class from the SDK.

That's it! Thank you very much! laugh.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th September 2014 - 22:32