How can I use a foreign language char in Swing

Jason Orendorff jason at jorendorff.com
Mon Mar 4 05:49:30 EST 2002


Martin v. Loewis wrote:
> "Jason Orendorff" <jason at jorendorff.com> writes:
> >   1.  Missing Fonts.  Seems unlikely.  But if this is the problem,
> >       it's easy to fix.  :)
> 
> Actually, this is quite likely: MS normally choses "?" as the
> replacement character, and you need to explicitly request CJK fonts
> when installing the English edition of W2k. If "Windows" really means
> "W9x" in this context, things are probably even worse.

Wow, really?  I know next to nothing about it - but it feels
as though I once heard that fonts have an explicit "i-am-stumped"
glyph, usually an empty box...

In any case, under Swing, it seems empty blocks are used as
placeholders for characters that are not present in any font.
(I had thought that installing the Java 1.4 SDK installs at least
one rather comprehensive Unicode font, but on tinkering around
just now, it seems many scripts aren't included.  Blah.)
It also seems that Java likes to convert unrecognized bytes
to '?'s when decoding.  So: yes, missing fonts are a much more
likely problem than I guessed -- but I suspect that there's also
a problem with encodings somewhere.  (sigh)

## Jason Orendorff    http://www.jorendorff.com/





More information about the Python-list mailing list