How to display chineses in screen?

5 posts / 0 new
Last post
linhuamao
linhuamao's picture
Offline
Joined: 24 Mar 2010
Posts:
How to display chineses in screen?

How to display Chinese in screen?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

You can create multibyte character strings using the MAUtil::WString() class. The function maDrawTextW() will write Chinese characters to the screen, provided that the phone you're using supports it. MAUI::Fonts doesn't support WString() at the moment, and it only supports UTF-7 character sets, but if you've got the fonts installed on your PC, you can create a Hanzi 7-bit font following this tutorial here http://www.mosync.com/documentation/tutorials/creating-new-fonts

I think that there is a plan to support multibyte (utf-16) character sets in the font classes, but I don't think that it is scheduled in the short term.

Hope this helps!

goodfriend
goodfriend's picture
Offline
Joined: 29 Mar 2010
Posts:

Hi, but where can i find the function maDrawTextW()? and the class WString? Which header file should i include?

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

maDrawTextW is in maapi.h, and WString is in MAUtil::String.

fatalerror
fatalerror's picture
Offline
Mobile Conjurer
Joined: 2 Oct 2009
Posts:

Note that you need to use one of the later nightly build to use those functions as they're not in the 2.3 version.