HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: lowzoom on 2011-11-01 01:21:09

Title: How to display non-ascii characters in menus ?
Post by: lowzoom on 2011-11-01 01:21:09
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.
Title: How to display non-ascii characters in menus ?
Post by: foosion on 2011-11-01 13:56:13
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.
Title: How to display non-ascii characters in menus ?
Post by: lowzoom on 2011-11-02 00:00:05
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!