If you've ever run into problems faced with multi-lingual text differences, Jason's latest article will solve just that. Learn how to make use of Unicode character-sets when developing in a J2ME-based environment, where you'll more than likely have a need to develop MIDlets in multiple languages.
public class SimpleUnicodeTest extends MIDlet { Display display; Form form = null; StringItem msg = null;
public SimpleUnicodeTest() { }
public void startApp() { display = Display.getDisplay(this); msg = new StringItem("'Hello World' in Japanese","u3053u3093u306Bu3061u306Fu4E16u754C"); form = new Form("Unicode Test"); form.append(msg); display.setCurrent(form); }
public void pauseApp() {} public void destroyApp(boolean unconditional) {} }
The output of our Hello World MIDlet should look like the following:
See “Reference Section” for the online web tools I used to convert Hello World to and from to u3053u3093u306Bu3061u306Fu4E16u754C.