Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Certain Arabic characters are not properly displayed in Java ME applications that utilize LCDUI Forms on Symbian devices

From Wiki
Jump to: navigation, search



Some Arabic characters, are not properly displayed in Java ME applications on Symbian devices.


The following sequences of Arabic characters are not properly displayed and some characters are cut off on Symbian devices:

Arabic Sample Text No1: "ادخل الاسم"

Arabic Sample Text No2: "اسمي"

The error affects LCDUI Forms when the String is appended as an item.

How to reproduce

In the code below, the affected sequences of Arabic characters are displayed twice. Once as appended items to the MIDlet's main form and once as String contained within a non modifiable TextField that is appended to the main form.

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class ArabicErrorsMIDlet extends MIDlet implements CommandListener {
Display display;
Form mainform;
Command exitCommand = new Command("Exit", Command.EXIT, 0);
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {}
protected void pauseApp() {}
protected void startApp() throws MIDletStateChangeException {
display = Display.getDisplay(this);
mainform = new Form("Arabic Errors");
String s = "ادخل الاسم";
String txt = "ادخل الاسم";
String txt2 = "اسمي";
TextField text = new TextField("",txt,20,TextField.UNEDITABLE);
TextField text2 = new TextField("",txt2,20,TextField.UNEDITABLE);
public void commandAction(Command c, Displayable d) {
if(c == exitCommand)

When the String is appended directly to the form, it is not displayed properly. When the String is wrapped within a TextField, the error cannot be reproduced.

This is a screenshot from Nokia 701:


Affected Devices

This error seems to affect all Symbian devices. It has been reproduced in the following devices:

S60 3rd Edition Feature Pack 1: Nokia E71 and Nokia N95

S60 3rd Edition Feature Pack 2: Nokia E52

S60 5th Edition: Nokia C5-03

Nokia Belle: Nokia 701

This error does not affect Series 40 devices.


As a solution, it is possible to create a non-modifiable TextField that contains the Arabic String and append that to the Form, instead of appending directly the String, as shown in the sample code here.

Article Metadata
Code ExampleTested with
Devices(s): Nokia C5-03, Nokia 701, Nokia E52, Nokia E71, Nokia N95
Created: skalogir (09 Feb 2012)
Last edited: hamishwillee (17 Oct 2013)
This page was last modified on 17 October 2013, at 06:03.
125 page views in the last 30 days.