Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

J2me polish and Farsi text problem

  Asked By: Hayfa    Date: Sep 15    Category: Java    Views: 1769
  

I am developing a mobile application using j2me polish.
everything works fine inside emulator but after I deployed
application in real device, Farsi text is shown left to right
and characters are seperated. For example the word "سلام"
is shown like: م ا ل س

Do you know a solution to solve this misbehavior?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Gustavo Taylor     Answered On: Sep 15

some devices dose not support font engine to show farsi  text , u should use "bit
map" font , i had the same problem  , and i used that.
2 way for u:
method-1-implement a font component for drawing farsi text  by implementing a
class that have 3 main method
1-drawString(Graphics g,String text,int x,int y,int anchor);
2-stringWidth();
3-fontHeight();
method-2-using an open source project of this implementation if u can find it ,
use this link
"forum.gsmaria.com/attachment.php"

 
Answer #2    Answered By: Velma Adams     Answered On: Sep 15

I found an application  
on j2me.blogfa.com named patchedFontME.
This application solved my problem  on SonyEricsson
mobiles but the problem is still exist in some other
mobiles like Nokia.

Your solution  is suitable for Canvas but I want to use
Farsi (Persian) text  inside standard components like
Alert, List, ChoiceGroup and so forth. These components
just get a String object as their argument. What should
I do? I am using j2me  Polish 2.1.1.

My code:

//#style mainScreen
screen = new List(Locale.get("menu.title"), List.IMPLICIT);

//#style mainCommand
screen.append(Locale.get("menu.start"), null);

Locale.get("...") returns a Java String object.

 
Answer #3    Answered By: Wilbur Hall     Answered On: Sep 15

make messages_persian.txt (just like messages_english.txt in polish)write youre persian message in unicode format there(u can use this for dynamic localization too)

 
Didn't find what you were looking for? Find more on J2me polish and Farsi text problem Or get search suggestion and latest updates.




Tagged: