×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    200

    unable to display unicode values from text file

    Hello Friends
    i'm making java application . in that i want to display "Marathi" text..
    So i'm taken string which contain values of unicode
    e.g. String strTemp = "\u0939\u0935\u093E"
    So when i put this string into form or list its showing proper Marathi text.
    But if i save this "\u0939\u0935\u093E" into normal text file then it doesnt show Marathi text it just showing normal string value like "\u0939\u0935\u093E" ..

    So i'm confuse ., plz tell is there any other logic or give me any sample code
    thanks & Regards.
    Nilesh

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: unable to display unicode values from text file

    I guess that's because you put a string in the file, and not the Unicode characters. You have to convert the string to a character, or put the actual character values in the text file (not as strings of multiple characters).

    Read this old, but still good and valid article explaining character encoding:

    http://www.joelonsoftware.com/articles/Unicode.html

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    31

    Re: unable to display unicode values from text file

    Quote Originally Posted by nyerunkar View Post
    Hello Friends
    i'm making java application . in that i want to display "Marathi" text..
    So i'm taken string which contain values of unicode
    e.g. String strTemp = "\u0939\u0935\u093E"
    So when i put this string into form or list its showing proper Marathi text.
    But if i save this "\u0939\u0935\u093E" into normal text file then it doesnt show Marathi text it just showing normal string value like "\u0939\u0935\u093E" ..

    So i'm confuse ., plz tell is there any other logic or give me any sample code
    Hi Nilesh,

    Here is the link
    http://www.developer.nokia.com/Commu...text_resources
    this shows how to do localization in j2me . I have tried this with hindi in my application and able to display the
    hindi text. Follow the same process they gave in the link .
    Note: The resource file should be saved in UTF-8 encoding as mentioned or else it wont work.
    Regards,
    Venkatesh

  4. #4
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    200

    Re: unable to display unicode values from text file

    Quote Originally Posted by petrib View Post
    I guess that's because you put a string in the file, and not the Unicode characters. You have to convert the string to a character, or put the actual character values in the text file (not as strings of multiple characters).

    Read this old, but still good and valid article explaining character encoding:

    http://www.joelonsoftware.com/articles/Unicode.html
    thanks petrib for the help.....
    thanks & Regards.
    Nilesh

  5. #5
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    200

    Re: unable to display unicode values from text file

    Quote Originally Posted by venky2810 View Post
    Hi Nilesh,

    Here is the link
    http://www.developer.nokia.com/Commu...text_resources
    this shows how to do localization in j2me . I have tried this with hindi in my application and able to display the
    hindi text. Follow the same process they gave in the link .
    Note: The resource file should be saved in UTF-8 encoding as mentioned or else it wont work.
    hey thanks for reply
    actually i tried bt still did nit get success .. will plz tell me how to fetch data from file ... n how to convert & show in j2me stringItem field ...
    thanks & Regards.
    Nilesh

  6. #6
    Registered User
    Join Date
    Sep 2012
    Posts
    31

    Re: unable to display unicode values from text file

    Quote Originally Posted by nyerunkar View Post
    hey thanks for reply
    actually i tried bt still did nit get success .. will plz tell me how to fetch data from file ... n how to convert & show in j2me stringItem field ...
    Did you go with the same process they mentioned in the link? . Are you able to create a res file using the java code they mentioned?
    If yes then did you try with the same method mentioned for retrieving the data ? .
    Can you be specific if any errors ? so that i can help out to proceed further
    Regards,
    Venkatesh

  7. #7
    Registered User
    Join Date
    Jun 2010
    Location
    India
    Posts
    200

    Re: unable to display unicode values from text file

    Quote Originally Posted by venky2810 View Post
    Did you go with the same process they mentioned in the link? . Are you able to create a res file using the java code they mentioned?
    If yes then did you try with the same method mentioned for retrieving the data ? .
    Can you be specific if any errors ? so that i can help out to proceed further
    hey thanks venky2810
    Actually i made some silly mistake due to its not working but now its working..

    thank you for your time...
    thanks & Regards.
    Nilesh

Similar Threads

  1. Display Unicode text file to richtext editor
    By lonesomeboy in forum Symbian
    Replies: 7
    Last Post: 2010-07-21, 16:01
  2. Display Unicode text file to CEikEdWin editor
    By lonesomeboy in forum Symbian
    Replies: 3
    Last Post: 2010-07-21, 13:05
  3. display unicode file in a CEikRichTextEditor
    By papana in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-07-21, 16:02
  4. Replies: 0
    Last Post: 2004-10-07, 08:57

Posting Permissions

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