• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Unicode in TextArea

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I show unicode characters from range \u0900 to \u097F in TextArea? They are not visible in TextArea, but JTextArea shows them properly. Is there any way to show them properly, as intended in TextArea?
TIA,
- Manish
 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not real good with this stuff don't optional character support installed on my workstation, so I cannot check out what I'm saying, but ...
Have you specified a font that includes Devaganari? Is that font configured for use with the native windowing system on your computer (e.g, Windows or Motif). If not, it may be substituting a font that does not support those characters.
If you are using Windows, you might use the character map accessory to see if the font you selected is present and supports those characters.
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks John,
I am using windows 2000, and font is standard "dialog" font of Java, and I just intend to display all the available chracters. My questions is why it works with JTextArea and not with TextArea? I thought Java awt compoents had unicode support since very begining.
Does anybody know if it's a known issue or sth...
- Manish
 
John Dale
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would think that for AWT components, the glyphs generation is completely under control of the the underlying operating system. So if whatever font your system uses for "dialog" (ariel on my machine) does not have glyphs for these characters, you won't see them.
In Swing, the glyphs are generated and placed in the bitmap representing the screen within the Java environment, which can be configured to map and support the fonts differently. (See jre/lib/font.properties .)
I'm pretty sure that on my machine, none of the fonts currently installed include the Devanganari characters, so I would not expect to see them in either Swing or AWT widgets, even though Unicode is supported. I expect your machine has some fonts that support Devanganari, and some that don't. If Windows machine, you should be able to use the Character Map accessory to see that.
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic