×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    displaying arabic using j2me

    hi every body,
    my experience with j2me is very little and i need to display arabic text
    i am using eclipse and carbide j1.5
    i searched the forum and i found that writing the following should work
    String s=new String("arabic_string".getBytes(), "UTF-8");
    but when i display s it appears like ????
    i used
    String en= System.getProperty("microedition.encoding");
    String lc= System.getProperty("microedition.locale");

    the ecoding is ISO8859-1
    and the locale is en or ar according to the setting of the phone language
    i am testing on deviced nokia n73 and nokia 6630
    i got the same output with the 2 device


    urgent help is required plz
    and if any body has a sample code that would be great

    thanks
    raghda

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: displaying arabic using j2me

    Juarez Alvares Barbosa Junior - Brazil

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    Re: displaying arabic using j2me

    hi,
    thanks for trying to help but i am still having problems
    i followed this links but i got lost i am still new to j2me and the discussions u forwarded me too are complicated for me.
    lets make the questions and answers more simple.
    can i do the following ?
    String s=new String("\u0628\u06A9".getBytes(), "UTF-8");
    where \u0628\u06A9 is the unicode of two arabic letters?
    i found this answer while searching the forums but it is not working with me i still get ???? instead of the arabic characters


    plz i really need urgent help

    thanks
    raghda

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    Re: displaying arabic using j2me

    hi every body,
    i checked my mobile encoding and i found that my mobile encoding is ISO-8859-1 and i know that this encoding doesnot support arabic
    is there any way to make my mobile support utf encoding?

    replies are appreciated
    raghda

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    I have not so much experience with Java Unicode, however, some questions:
    Quote Originally Posted by raghda
    String s=new String("\u0628\u06A9".getBytes(), "UTF-8");
    where \u0628\u06A9 is the unicode of two arabic letters?
    Is this not UTF-16? Why not avoiding getBytes(), which work on ISO-Latin-1 normally, and creating the byte array manually or why not: String s = "\u0628\u06A9";
    What happens if you set your java compiler encoding and your editor encoding to UTF-8, can you even enter these character directly?
    Last edited by traud; 2007-05-29 at 12:04.

  6. #6
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    Re: displaying arabic using j2me

    hi traud,
    thanks for reply but actually i am new to encoding i dont know the difference between UTF8 and UTF16 and i dont know how to set my compiler encoding to UTF 8.
    if u plz tell me how to set my encoding to UTF8 that would be great

    thanks
    raghda

  7. #7
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    Re: displaying arabic using j2me

    plz guys urgent help is needed here
    raghda

  8. #8
    Regular Contributor
    Join Date
    May 2007
    Location
    dubai
    Posts
    62

    Re: displaying arabic using j2me

    hi guys,
    did any body tried before to create his own font to support arabic?
    if yes please tell me how to do that
    thanks
    raghda

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Quote Originally Posted by raghda
    i dont know the difference between UTF8 and UTF16
    Therefore, I gave you a link to Unicode.org which will explain the difference. Java is UTF-16 based and \uXXXX is a UTF-16 code. If you work with fixed/constant/final strings like you do in your example, there is no need to convert anything.†
    Quote Originally Posted by raghda
    i dont know how to set my compiler encoding to UTF 8.
    There is no need to do anything to you environment. This was just another example to make it easier.

    String s = "\u0628\u06A9";
    Does this line of code give you brackets (place-holders) or arabic? I bet it gives arabic…then there is no reason for playing around with images††.

    If you change the encoding of your environment (text editor, compiler; all that should be handled by Ecplice encoding menu automatically), you could even write:
    String s = "کب";
    I am really curios, whether this comes through to you (and what it means).

    † This gets different when you deal with data bytes from external sources (like the Internet, File, etc). Then you have to encode the bytes correctly to get (readable) characters. I recommend to learn the difference between the Java classes Byte, Character and String.
    †† You might have to play with images when you mobile phone does not have an arabic language pack as the glyphs for the characters are missing.

  10. #10
    Regular Contributor
    Join Date
    Dec 2005
    Posts
    62

    Re: displaying arabic using j2me

    hi dear ppl.

    i want to display "ЗАГРУЖАЕТСЯ" russian text in phone but have to read fron the code file directly.
    I tried new String("ЗАГРУЖАЕТСЯ".getBytes(),"UTF-8")
    new String("ЗАГРУЖАЕТСЯ".getBytes("UTF-8"),"UTF-8") no use.If anybody has any idea plz share with me.


    Thanks and regards
    rakesh

  11. #11
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Cairo,Egypt
    Posts
    72

    Re: displaying arabic using j2me

    Dear Raghda,
    we already display arabic with no problem and if the device doesn't support arabic we make our Arabic unicode shapper which write the character with unicode. i can't publish it because its company work. but i can help you if you want to make your owen.
    and another thing we never face this problem in N73 and 6630 they already support arabic..
    thanks
    thanks
    Wael Nabil
    Product Manager
    CITGlobal MOBiDIV
    Egypt.

  12. #12
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    rakesh, is your Russian text in a text file in your JAR or is it within one of you java/class files? Just write String s = "ЗАГРУЖАЕТСЯ"; into your java file and make sure to tell javac to read your java file with the correct encoding (like UTF-8 if you text editor uses UTF-8).

  13. #13
    Registered User
    Join Date
    May 2008
    Posts
    11

    Re: displaying arabic using j2me

    Hi, did you resolved your problem or not ?

  14. #14
    Regular Contributor
    Join Date
    May 2009
    Posts
    52

    Re: displaying arabic using j2me

    hiii,

    any have any idea about this problem then pls help meeeeeee....urgent

  15. #15
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: displaying arabic using j2me

    There are several discussions about Arabic support...

    http://discussion.forum.nokia.com/fo...ghlight=arabic
    http://discussion.forum.nokia.com/fo...ghlight=arabic

    Or use the forum search for "arabic".

    Do you find your answer?

    Graham.

Similar Threads

  1. my j2me has aproblem with arabic!!!
    By nmostafa in forum Mobile Java General
    Replies: 18
    Last Post: 2009-05-22, 08:29
  2. Displaying Arabic characters in Symbian 80 series platform
    By ductechteam in forum Mobile Java General
    Replies: 3
    Last Post: 2006-09-06, 14:44
  3. Displaying an Alert on a J2ME device
    By cj901 in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-25, 03:18
  4. Displaying chinese within J2ME applications
    By damien12345 in forum Mobile Java General
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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