×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Question Arabic font issue with nokia mobiles

    I have tested my application in sun java toolkit , nokia emulators and nokia mobiles(n79,e63). Here i faced one problem. that is arabic font showing properly on sun java emulators. but its showing wrongly on nokia mobiles and emulators. find the attached image for the difference between nokia emulator and sun java emulator. What is that issue? Im using LWUIT and L10N for arabic localization in ResourceEdit.
    Attached Images Attached Images
    • File Type: png 2.PNG (68.6 KB, 78 views)
    Bharath... :)

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Arabic font issue with nokia mobiles

    Hi,

    I didn't have any problems running the sample code below on N79:
    Code:
    import com.sun.lwuit.Button;
    import com.sun.lwuit.Display;
    import com.sun.lwuit.Form;
    import com.sun.lwuit.Label;
    import com.sun.lwuit.events.ActionEvent;
    import com.sun.lwuit.events.ActionListener;
    import com.sun.lwuit.layouts.BorderLayout;
    
     
    public class LWUITMidlet extends javax.microedition.midlet.MIDlet implements ActionListener {
     Button mybutton;
     Form f;
       public void startApp() {
           //init the LWUIT Display
           Display.init(this);
    
           f = new Form("العربية");
           
           mybutton=new Button("Exit");
           
           f.setLayout(new BorderLayout());
           f.addComponent(BorderLayout.CENTER, new Label("العربية"));
           
           mybutton.addActionListener(this);
           f.addComponent(BorderLayout.SOUTH,mybutton);
           f.show();
       }
     
       public void pauseApp() {
       }
     
       public void destroyApp(boolean unconditional) {
       }
    
        public void actionPerformed(ActionEvent ae) {
            notifyDestroyed();
        }
    }
    Both the Nokia Symbian SDK and Nokia SDK 1.0 for Java work fine (i.e. I can see arabic on the emulator and the device).

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Re: Arabic font issue with nokia mobiles

    I just reading an Arabic words from ResourceEdit localization(L10N) and show that Arabic words in TextArea. But some words are showing wrongly when I showing. In sun toolkit everything perfect. I'm facing this issue when i tested into nokia emulators and nokia mobiles. I want to know why its happened an Is there any problem for localization on ResourceEdit?
    Bharath... :)

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Arabic font issue with nokia mobiles

    I have seen in the release notes of LWUIT 1.5 the following:

    Fix for text wrapping in languages that need text width size by string and not by
    char (e.g. Arabic).
    Try using both LWUIT 1.4 and LWUIT 1.5, to ensure that it is not something that was either fixed or broken on the version you are working.

    If changing the version of LWUIT doesn't solve your problem, you need to do some additional investigation in order to find out where the problem lies.

    For the Arabic words that are not properly displayed, try using a simple "Hello World" example without LWUIT, i.e. replace the String "This is a Hello World example" in the code below with the problematic words (use Nokia's SDK):
    Code:
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    
    public class HelloWorld extends MIDlet implements CommandListener {
    
    	Form f;
    	Command exitCommand;
        
        public void startApp() {
        	exitCommand=new Command("Exit", Command.EXIT,0);
        	f=new Form("Hello World");
        	f.append("This is a Hello World example");
        	f.addCommand(exitCommand);
        	f.setCommandListener(this);
        	Display.getDisplay(this).setCurrent(f);
        	
        }
    
        public void pauseApp() {
        }
    
        public void destroyApp(boolean unconditional) {
        }
    
    	public void commandAction(Command c, Displayable d) {
    		if(c==exitCommand)
    		{
    			notifyDestroyed();
    		}
    		
    	}
    }
    If above example works, it is most likely a LWUIT issue. If it doesn't work, then it requires investigation from Nokia and you should post back here your findings, including the words that are not properly displayed.

    So, if it turns out that the above example works, try next to see if it is a LWUIT generic or Resource Editor specific issue. Try using the code I provided in my previous post that uses Labels to display again the problematic words (or even better write another one with a TextArea and display your words there without using the ResourceEditor first). If this works, then it's most likely a Resource Editor issue. If it doesn't work, it's a more generic LWUIT issue, rather than Resource Editor specific.

    If it's either a LWUIT generic or Resource Editor specific error, I am afraid there is not so much help that you can get on this forum, as LWUIT and the Resource Editor are developed by Oracle. You might want to try Oracle's knowbase

    https://support.oracle.com/CSP/ui/fl...xk01p%28%29%29

    You might also want to consider other Java ME UI frameworks:
    http://www.developer.nokia.com/Commu..._UI_Frameworks

  5. #5
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Arabic font issue with nokia mobiles

    Could you provide the text shown in your attached png, as a keyboard sequence of latin characters?
    Last edited by skalogir; 2011-12-13 at 12:54.

Similar Threads

  1. Nokia J2ME Arabic Right-to-Left Issue
    By okashino in forum Mobile Java General
    Replies: 0
    Last Post: 2011-03-26, 02:05
  2. Arabic Display Issue in Nokia Mobiles
    By hooopoe in forum Mobile Java General
    Replies: 2
    Last Post: 2009-02-02, 09:12
  3. Replies: 5
    Last Post: 2008-10-12, 09:10
  4. arabic font using
    By kmsoomro in forum Symbian
    Replies: 0
    Last Post: 2003-07-28, 06:41

Posting Permissions

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