Re: Charset?
From: Thomas Weidenfeller (nobody_at_ericsson.invalid)
Date: 07/30/04
- Next message: Steven T Abell: "Re: A Look'n Feel for Prototypes?"
- Previous message: Viktor Lofgren: "Charset?"
- In reply to: Viktor Lofgren: "Charset?"
- Next in thread: Roedy Green: "Re: Charset?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 15:35:08 +0200
Viktor Lofgren wrote:
> Is there a way to set the charset of the swing widgets (just JTextField
> and JTextPane would do as well)? Currently all extended characters are
> rendered as square "boxes".
Java (including Swing) only uses one charset: Unicode. If you don't get
your characters displayed, then usually one of the following has happened:
- You didn't use the appropriate charset conversion from an external
charset to Java's internal unicode. Your Java Strings and chars are
trashed due to the missing/wrong conversion. You will not only have
display problems, but other character and string related methods can
fail in mysterious ways (e.g. sorting).
- You are using a font which doesn't have the necessary glyphs to
display the particular characters. Change to a font with the necessary
glyphs.
More unlikely reasons are
- A trashed Java installation where e.g. the font.properties file is
trashed
- A trashed OS, e.g. trashed OS font data
BTW: "extended characters" is a meaningless term.
/Thomas
- Next message: Steven T Abell: "Re: A Look'n Feel for Prototypes?"
- Previous message: Viktor Lofgren: "Charset?"
- In reply to: Viktor Lofgren: "Charset?"
- Next in thread: Roedy Green: "Re: Charset?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|