Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to display non-ascii characters in menus ? (Read 2600 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to display non-ascii characters in menus ?

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.

 

How to display non-ascii characters in menus ?

Reply #1
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.

How to display non-ascii characters in menus ?

Reply #2
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!