Click to See Complete Forum and Search --> : display foreign language records


tinh_tam
08-27-2003, 10:28 PM
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.

ArchAngel
08-28-2003, 03:38 AM
Do you have a vietnamese font installed?

tinh_tam
08-28-2003, 10:09 AM
ArchAngel, yes, vietnamese font is installed.

ArchAngel
08-28-2003, 10:17 AM
...and you're specifying that that is the font to use in display?

tinh_tam
08-28-2003, 11:37 AM
how do i specify the font to use in display?

ArchAngel
08-29-2003, 04:44 AM
Are you trying to display this on the console or in a Swing window?

tinh_tam
08-29-2003, 10:02 AM
Console

ArchAngel
08-29-2003, 11:02 AM
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:

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);
}
}
}

tinh_tam
08-29-2003, 01:39 PM
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.

ArchAngel
08-29-2003, 05:46 PM
Is your font listed in the above program?

tinh_tam
09-03-2003, 03:02 PM
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.

ArchAngel
09-04-2003, 03:33 AM
Have you tried using MySQL? It's free.... (don't know what its language support is like though).