You Are Here:

Community: Developer Discussion Boards

#1 Old Displaying Chinese characters - 2003-10-07, 19:32

Join Date: Oct 2003
Posts: 9
Location: Malaysia
TiffanyLim
Offline
Registered User
Is there a way to display Chinese or other unicode characters
on the Nokia Series 40 handphones? I have tried using
the standard "/u" unicode escape sequence in my strings
to no avail. Reading from a utf-8 file also proved futile and
the same goes for changing the language settings for the
phone (which just changed the system characters). Thank you.

Best regards,
Tiffany Lim
www.Sherman3D.com
Reply With Quote

#2 Old 2003-10-07, 21:12

Join Date: Jun 2003
Posts: 4,322
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Tiffany,

This works in the 7210 emulator, but only when started with one of these commands:
Code:
7210.exe -language chinese_simplified chtest.jad
7210.exe -language chinese_traditional chtest.jad
My code is:
Code:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class chtest extends MIDlet implements CommandListener {

    private static final Command cmdEXIT =
            new Command ("Exit", Command.EXIT, 1);

    public void startApp () {
        Display disp = Display.getDisplay (this);

        Form frm = new Form ("\u4f60\u597d");
        frm.addCommand (cmdEXIT);
        frm.setCommandListener (this);

        disp.setCurrent (frm);

        frm.append ("\u4f60\u597d");
    }

    public void pauseApp () {
    }

    public void destroyApp (boolean bUnconditional) {
    }
	
    public void commandAction (Command cmd, Displayable disp) {
        if (cmd == cmdEXIT) {
            destroyApp (false);
            notifyDestroyed ();
        }
    }
}
My phone is a European 6100, so doesn't display Chinese characters. Does it work for you? If it does, you should be able to use both '\u<i>xxxx</i>' notation or UTF-8. If you can't get it working, you're welcome to post some code, or email it to me (click the "profile" button at the bottom of this message).

Graham.
Reply With Quote

#3 Old 2003-10-08, 15:10

Join Date: Oct 2003
Posts: 9
Location: Malaysia
TiffanyLim
Offline
Registered User
Thanks, Graham. I will try it out at work.
Does this work on the Nokia 7210 emulator that
comes with the SDK?

Best regards,
Tiffany Lim
www.Sherman3D.com
Reply With Quote

#4 Old 2003-10-08, 20:23

Join Date: Jun 2003
Posts: 4,322
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Yes - I've only tried it on the emulator from the 7210 SDK, because I know my phone won't display Chinese characters. I think it has to be a Chinese (or at least Asia/Pacific) model.

(I should add: I don't read Chinese script, so I have no idea what the characters "\u4f60\u597d" mean! I apologize if I have inadvertantly written something inappropriate!)

Graham.
Reply With Quote

#5 Old 2003-10-09, 18:28

Join Date: Oct 2003
Posts: 9
Location: Malaysia
TiffanyLim
Offline
Registered User
Thanks a lot, Graham. It seems to be working fine for me now -
must have used the wrong unicode because I did the
exact same thing before. I am not sure what the Chinese
characters mean myself so don't worry. Looks like I will have to
get a list of Chinese unicode escape sequences.

I am having some problems with tone and midi now so I am
going to post in the Sound forum.

Thanks again.

Best regards,
Tiffany Lim
www.Sherman3D.com
Reply With Quote

#6 Old 2003-10-10, 18:55

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
Tiffany, you can set emulator's language from the emulator's Tools menu. This way you don't need any command line arguments.

If you used external UTF-8 files instead of unicode sequence you can copy-paste chinese characters from, e.g. word document to any application that will create UTF-8 file. I've heard that you can make such files with standard Windows notepad. I created a small Java application for this issue (a bit more complex, of course. If I needed just copy paste I would try using notepad first)
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ