×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    18

    displaying japanese character or hindi character on phone

    Im trying to display hindi characters on phone by reading from a file.....But the file is like a junk(like ??? ??) of characters....how can i read it and display those on emulator????I tried it but the same junk is getting printed on phone...So please solve this problem................

  2. #2
    Registered User
    Join Date
    Jul 2010
    Posts
    18

    Re: displaying japanese character or hindi character on phone

    actually i used unicodes...but when i directly give tht unicode string on program it displays the appropriate character...but while reading from a file problem arises...... i am new to j2me..so please tell me how shud i save the unicode file????my file contains series like \u\u0915\u093E\u0935\......is this fine????????how do i read it????

  3. #3
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: displaying japanese character or hindi character on phone

    Hi akhil0706,

    How are you saving the data ? If it is showing the ???? means you are not saving it as a utf-8 file . First open the file and copy any Unicode characters in to the file and save file as utf-8 . if you are using the note pad in that when you are saving the file you have an option of specifying the encoding type select that as utf-8.

    When you read the file read the bytes as utf-8 encoding .

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,563

    Re: displaying japanese character or hindi character on phone

    Note also that besides saving the data correctly, you also need to have font files with the correct characters/glyphs. Without the right fonts, the characters won't show (Nokia does not ship, e.g., Hindi fonts on phones made for and sold in countries/regions where Hindi is not an official language; same with Japanese, Chinese, Hebrew, Arabic, etc.).

  5. #5
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    75

    Re: displaying japanese character or hindi character on phone

    Nokia phones include the firmware (fonts) to display a very wide variety of alphabetic languages. Even though the phone itself may let you localize it (to display promps and messages) for only 4 or 5 languages, Every Nokia phone I've checked includes the ability to display Arabic, Russian, Ukrainian, Vietnamese, Hebrew, Hindi and more. Since alphabet are small (around 100 characters) it doesn't take much space to include any given alphabet. Non-alphabetic languages (ones that use ideograms), like Chinese, Japanese and Korean, need many thousands of different ideograms, so they are not routinely included on phones. Rather, they are included on phones destined for parts of the world where those languages are used.

    Bottom line: almost any phone you pick up will display Hindi, and almost no phone you pick up (outside of Japan) will display Japanese.

    The other point that has been raised is the difference between Unicode and encoding. Unicode specifies unique integer values to represent particular symbols (letters, number, punctuation, ideograms). These are called 'codepoints.' Enodings, like utf8, are used to store those integers (codepoints) more compactly. Java adopted the use of Unicode from the beginning. Nokia (and others) decided (sensibly) to use utf8. Therefore, you must make sure to use Unicode in your Strings and to encode them using utf8. My own approach is to use OpenOffice to create my documents and same them in utf8. As already mentioned when you read from the unicode/utf8 files you must specify that the encoding is utf8.

    Good luck.
    Cheers,

    Matt Brenner
    UnME2, Inc.

Similar Threads

  1. Rendering Hindi character on emulator..help please.....
    By akhil0706 in forum General Development Questions
    Replies: 2
    Last Post: 2010-07-27, 07:35
  2. how to write hindi half character from mobile keypad
    By rahulkrishna in forum Mobile Java General
    Replies: 11
    Last Post: 2009-09-02, 06:50
  3. How to display/input japanese and korean character in Nokia 6120c?
    By jhclai in forum General Development Questions
    Replies: 1
    Last Post: 2009-01-07, 10:28
  4. using hindi character sets
    By paulstraylight2 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-09, 14:55
  5. How to construct a link which contain Japanese character on it?
    By binhtt in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2002-11-04, 21:53

Posting Permissions

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