• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unicode & platform support

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

can somebody confirm whether the following is true or false?

Even though Java supports unicode, if the underlying platform that the JVM is running on doesnt have a font capable of displaying a Unicode character then you are out of luck?


thanks in advance,

Susan
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As with everything else, it's bit more complex than that; but in general, yes, for your Java program to display a foreign script, it will need operating-system support.
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try showing your Unicode characters on a Swing component.
I usually get ??? or squares whenever I try to show non-ASCII characters onto an OS-supported display (eg Command Prompt or System.out), but I can get all sorts of peculiar characters including what looks like Chinese, to appear whenever I show a String with Unicode on something like JOptionPane.showMessageDialog().

CR
 
Susan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Campbell & Ernest thanks for the reply & confirmation.

I have a followup question, in the javadocs of the java.text package it says "Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages." Do you know what they mean by 'natural language'?


thanks again!
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Susan Oso:
Do you know what they mean by 'natural language'?



Human language, as opposed to computer languages.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic