Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > Java

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-27-2003, 11:28 PM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
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.
Reply With Quote
  #2  
Old 08-28-2003, 04:38 AM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
Do you have a vietnamese font installed?
__________________
ArchAngel.
O:-)
Reply With Quote
  #3  
Old 08-28-2003, 11:09 AM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
ArchAngel, yes, vietnamese font is installed.
Reply With Quote
  #4  
Old 08-28-2003, 11:17 AM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
...and you're specifying that that is the font to use in display?
__________________
ArchAngel.
O:-)
Reply With Quote
  #5  
Old 08-28-2003, 12:37 PM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
how do i specify the font to use in display?
Reply With Quote
  #6  
Old 08-29-2003, 05:44 AM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
Are you trying to display this on the console or in a Swing window?
__________________
ArchAngel.
O:-)
Reply With Quote
  #7  
Old 08-29-2003, 11:02 AM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
Console
Reply With Quote
  #8  
Old 08-29-2003, 12:02 PM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
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:-)
Reply With Quote
  #9  
Old 08-29-2003, 02:39 PM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
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.
Reply With Quote
  #10  
Old 08-29-2003, 06:46 PM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
Question

Is your font listed in the above program?
__________________
ArchAngel.
O:-)
Reply With Quote
  #11  
Old 09-03-2003, 04:02 PM
tinh_tam tinh_tam is offline
Registered User
 
Join Date: Aug 2003
Posts: 6
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.
Reply With Quote
  #12  
Old 09-04-2003, 04:33 AM
ArchAngel ArchAngel is offline
Senior Member
 
Join Date: Mar 2003
Posts: 834
Question

Have you tried using MySQL? It's free.... (don't know what its language support is like though).
__________________
ArchAngel.
O:-)
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:22 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.