|
#1
|
|||
|
|||
|
display foreign language records
I've a MS Access database containing data in a foreign language (vietnamese). I'm using a Java program which uses JDBC/ODBC to query the database for the records. However, when I display them, they appear garbled.
Any suggestions? thank you very much. |
|
#2
|
|||
|
|||
|
Do you have a vietnamese font installed?
__________________
ArchAngel. O:-) |
|
#3
|
|||
|
|||
|
ArchAngel, yes, vietnamese font is installed.
|
|
#4
|
|||
|
|||
|
...and you're specifying that that is the font to use in display?
__________________
ArchAngel. O:-) |
|
#5
|
|||
|
|||
|
how do i specify the font to use in display?
|
|
#6
|
|||
|
|||
|
Are you trying to display this on the console or in a Swing window?
__________________
ArchAngel. O:-) |
|
#7
|
|||
|
|||
|
Console
|
|
#8
|
|||
|
|||
|
I don't know a way of setting the console font. However, you can just use a setFont() method on a JEditorPane.
Check that your font is visible to Java: Code:
import java.awt.*;
public class Test {
public static void main(String[] args) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] fonts = ge.getAllFonts();
for (int i=0; i<fonts.length; i++) {
String faceName = fonts[i].getName();
System.out.println(faceName);
}
}
}
__________________
ArchAngel. O:-) |
|
#9
|
|||
|
|||
|
Thanks, ArchAngel, for your suggestion.
I've written a Swing app to test your suggestion. Unfortunately, it doesn't produce the desired outcome. If you'd like, i could send you the code and database to play with. thanks again. |
|
#10
|
|||
|
|||
|
Is your font listed in the above program?
__________________
ArchAngel. O:-) |
|
#11
|
|||
|
|||
|
after some research, I've found out that MS Access cannot handle UTF conversion. It can store vietnamese text but retrieving it is a different issue. Someone told me SQL Server can do the job nicely, but unfortunately i don't have sql server at this time.
anyway, thank you very much for your help. btw, vietnamese character set is an extended set of the english alphabet. so one can use fonts like: times new roman, arial, courier new, avantGarde, etc to type vietnamese. |
|
#12
|
|||
|
|||
|
Have you tried using MySQL? It's free.... (don't know what its language support is like though).
__________________
ArchAngel. O:-) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|