Page 1 of 1

Unicode support for DrawableText()

Posted: 2014-06-26T07:57:23-07:00
by jsanterre
Hi!

I need to create a DrawableText() object in C++ that support Unicode characters. I noticed that the constructor for DrawableText() is taking an encoding as an optional parameter. I tried the following: converting a wstring to an utf8 encoded string, pass this string as the text parameter and pass "UTF-8" as the encoding parameter. But it didn't work -- it displays an ? on screen instead of each Unicode character.

Would you have some advice for me?

Many thanks!

Julie

Re: Unicode support for DrawableText()

Posted: 2014-07-11T03:31:38-07:00
by dlemstra
Can you post a small code example? You don't need to specify the encoding parameter. Just make sure you pass an utf8 encoded string. And make sure that the font you are using supports those characters.

Re: Unicode support for DrawableText()

Posted: 2014-07-15T06:23:24-07:00
by jsanterre
Thank you very much for your help Dirk!

It turned out that I just needed to make sure the font I'm using support Unicode Characters. (From Dirk: "setting the font to 'Arial-Unicode-MS'")

I thought I should post the solution to my problem here so someone else could benefit from this.

Thank you again for your wonderful support! :D

Julie