| Reply | « Previous Thread | Next Thread » |
|
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 |
|
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 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 ();
}
}
}
Graham. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
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 |
|
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. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
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 |
|
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|