Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2005

Tip: Looking for answers? Try searching our database.

hindi unicode works but tamil does not ??

Thread view: 
drdoubt - 29 Apr 2005 06:22 GMT
Hello,

I am trying to print some Tamil characters but does work though Hindi
characters are being printed. I have fonts for both the languages.

Plus I just want to know how java picks up the fonts, does it have its
own fonts. Below is the program I have written.

import javax.swing.*;
public class UnicodeTest extends JFrame
{
    private String str;
    private JTextField text=null;

    public UnicodeTest()
    {
        //str="\u0932\u0947\u0915\u0930"; // Hindi works
        str="\u0B85\u0B87\u0B88";   // Tamil does not work

        text=new JTextField(10);
        add(text);
        setSize(100,100);
        setVisible(true);
    }

    public static void main(String[] args)
    {
        UnicodeTest obj=new UnicodeTest();
        obj.print();
    }

    private void print()
    {
        text.setText(str);
    }
}

regards,
vijay.
Roland - 29 Apr 2005 10:24 GMT
> Hello,
>
[quoted text clipped - 3 lines]
> Plus I just want to know how java picks up the fonts, does it have its
> own fonts. Below is the program I have written.
[snip]
> regards,
> vijay.
Apparently the Java font used for the JTextField does not have glyphs
for the Tamil characters (but is has for Hindi chars).
Try so set the font of the textfield to a font for which you know it has
glyphs for Tamil chars.
For info on how Java deals with fonts, see "Fonts" section of
<http://java.sun.com/j2se/1.5.0/docs/guide/intl/index.html>
Signature

Regards,

Roland de Ruiter
  ___      ___
 /__/ w_/ /__/
/  \ /_/ /  \



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.