Icelandic letters
In my database I have some icelandic letters (Á Ð É Í Ó Ú Ý Þ Æ Ö á ð é í ó ú ý þ æ ö) but when I get them form db by getString() (ResultSet) insted of "Ð Þ Æ ð þ æ" I get 6 "?"... I change default encoding to UTf-8 but it didn't help mayby some of ISO-????-? one but I don't know which. I try also use in my db ie. \u00c6 insted of Æ, but in output I got \u00c6 as string and not icelandic letter.. pls help me...
请先登录再写评论。
Do you have the proper font in use that is able to show these non-ascii
characters?
Sven
Michal Plichta wrote:
how to change it? I use System.out.print() for tests... so it's a pure
text output. I didn't try in graphical windows (applets or graphics
app). So should I use a Font class to represents those specyfic letters
or what? How to manege it in text output?
Sven Krause wrote:
Where are you working? In the Windows console window - then you need to
setup this or in the idea console - then you need to setup idea. I can
recommend (for windows) the arialuni.ttf (its available at
http://www.alanwood.net/unicode).
Hope this helps,
Sven
Michal Plichta wrote:
>> Do you have the proper font in use that is able to show these
>> non-ascii characters?
I use JFrame and JLabel to show db record.I set font to Arial Unicode MS but it dosen't help.. the problem is the same... if use i my db unicode code of letter instead of letter... in output i get code... not letter:(
Ok, ok. You need to do some thing more to use the unicode font in Java.
1. You need to enhance the font.properties (located in jre/lib) (see the
attached example)
2. place the font into jre/lib/fonts. (it does not work on all Win OS,
so copy it into the %WIN%/fonts folder too)
3. set the font for your label a) using the font alias as specified in
the font.properties or b) use the physical font name direct.
PS:
try the attache fontInfo.jar to double check the availability of you
fonts. (you need to place dom.jar, jaxp-api.jar, xalan.jar,
xercesImpl.jar and sax.jar into a sub folder "lib" to run the jar
sucessful or to add them manual to the classpath- take a look into the
manifest file).
Hope this helps.
Sven
Michal Plichta wrote:
@(#)font.properties 1.11 99/07/22
#
AWT Font default Properties for Windows
#
dialog.0=Lucida Sans Regular,ANSI_CHARSET
dialog.1=Arial Unicode MS,ANSI_CHARSET
dialog.2=Arial,ANSI_CHARSET
dialog.3=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.4=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.0=Arial Bold,ANSI_CHARSET
dialog.bold.1=Lucida Sans Demibold,ANSI_CHARSET
dialog.bold.2=Arial Unicode MS,ANSI_CHARSET
dialog.bold.3=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.4=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.italic.0=Lucida Sans Oblique,ANSI_CHARSET
dialog.italic.1=Arial Italic,ANSI_CHARSET
dialog.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bolditalic.0=Lucida Sans Demibold Oblique,ANSI_CHARSET
dialog.bolditalic.1=Arial Bold Italic,ANSI_CHARSET
dialog.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.0=Courier New,ANSI_CHARSET
dialoginput.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bold.0=Courier New Bold,ANSI_CHARSET
dialoginput.bold.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bold.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.italic.0=Courier New Italic,ANSI_CHARSET
dialoginput.italic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.italic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.0=Courier New Bold Italic,ANSI_CHARSET
dialoginput.bolditalic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.0=Times New Roman,ANSI_CHARSET
serif.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.bold.0=Times New Roman Bold,ANSI_CHARSET
serif.bold.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bold.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.italic.0=Times New Roman Italic,ANSI_CHARSET
serif.italic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.italic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.bolditalic.0=Times New Roman Bold Italic,ANSI_CHARSET
serif.bolditalic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bolditalic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.0=Lucida Sans Regular,ANSI_CHARSET
sansserif.1=Arial Unicode MS,ANSI_CHARSET
sansserif.2=Arial,ANSI_CHARSET
sansserif.3=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.4=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bold.0=Lucida Sans Demibold,ANSI_CHARSET
sansserif.bold.1=Arial Unicode MS,ANSI_CHARSET
sansserif.bold.2=Arial Bold,ANSI_CHARSET
sansserif.bold.3=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bold.4=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.italic.0=Lucida Sans Oblique,ANSI_CHARSET
sansserif.italic.1=Arial Italic,ANSI_CHARSET
sansserif.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bolditalic.0=Lucida Sans Demibold Oblique,ANSI_CHARSET
sansserif.bolditalic.1=Arial Bold Italic,ANSI_CHARSET
sansserif.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.0=Courier New,ANSI_CHARSET
monospaced.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bold.0=Courier New Bold,ANSI_CHARSET
monospaced.bold.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bold.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.italic.0=Courier New Italic,ANSI_CHARSET
monospaced.italic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.italic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bolditalic.0=Courier New Bold Italic,ANSI_CHARSET
monospaced.bolditalic.1=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bolditalic.2=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
name aliases
#
alias.timesroman=serif
alias.helvetica=sansserif
alias.courier=monospaced
for backword compatibility
zapfdingbats.0=WingDings,SYMBOL_CHARSET
font filenames for reduced initialization time
#
filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF
filename.Courier_New=COUR.TTF
filename.Courier_New_Bold=COURBD.TTF
filename.Courier_New_Italic=COURI.TTF
filename.Courier_New_Bold_Italic=COURBI.TTF
filename.Times_New_Roman=TIMES.TTF
filename.Times_New_Roman_Bold=TIMESBD.TTF
filename.Times_New_Roman_Italic=TIMESI.TTF
filename.Times_New_Roman_Bold_Italic=TIMESBI.TTF
filename.WingDings=WINGDING.TTF
filename.Symbol=SYMBOL.TTF
---------------
international fonts
---------------
filename.Lucida_Sans_Regular=LucidaSansReguslar.ttf
filename.Lucida_Sans_Demibold=LucidaSansDemiBold.ttf
filename.Lucida_Sans_Oblique=LucidaSansOblique.ttf
filename.Lucida_Sans_Oblique=LucidaSansOblique.ttf
filename.Lucida_Sans_Demibold_Oblique=LucidaSansDemiOblique.ttf
filename.Arial_Unicode_MS=ARIALUNI.TTF
---------------
end international fonts
---------------
DEFAULT font definition
#
default.char=2751
Static FontCharset info.
#
fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.2=sun.awt.CharToByteSymbol
fontcharset.dialoginput.0=sun.io.CharToByteCp1252
fontcharset.dialoginput.1=sun.awt.windows.CharToByteWingDings
fontcharset.dialoginput.2=sun.awt.CharToByteSymbol
fontcharset.serif.0=sun.io.CharToByteCp1252
fontcharset.serif.1=sun.awt.windows.CharToByteWingDings
fontcharset.serif.2=sun.awt.CharToByteSymbol
fontcharset.sansserif.0=sun.io.CharToByteCp1252
fontcharset.sansserif.1=sun.awt.windows.CharToByteWingDings
fontcharset.sansserif.2=sun.awt.CharToByteSymbol
fontcharset.monospaced.0=sun.io.CharToByteCp1252
fontcharset.monospaced.1=sun.awt.windows.CharToByteWingDings
fontcharset.monospaced.2=sun.awt.CharToByteSymbol
Exclusion Range info.
#
exclusion.dialog.0=0500-20ab,20ad-ffff
exclusion.dialoginput.0=0500-20ab,20ad-ffff
exclusion.serif.0=0500-20ab,20ad-ffff
exclusion.sansserif.0=0500-20ab,20ad-ffff
exclusion.monospaced.0=0500-20ab,20ad-ffff
charset for text input
#
inputtextcharset=ANSI_CHARSET
Attachment(s):
fontInfo.jar