File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Retrieving Japanese data from an access database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Retrieving Japanese data from an access database" Watch "Retrieving Japanese data from an access database" New topic
Author

Retrieving Japanese data from an access database

Tau Slater
Greenhorn

Joined: Jan 30, 2009
Posts: 12
Hello everyone - first post here, I'm a beginner, and have searched through the forums for something like my problem with no clear success...

So, I have an Access database, specified as a data source in control panel (as KanjiQuiz) and accessible by a small Java program that I wrote, based on code elsewhere on the web. The data in the DB is partially Japanese, and when I retrieve the Japanese data it comes back as "?" question marks.

Here's the code:



The database is 10 records of a kanji, onyomi and kunyomi and meaning - also example word here but that's not retrieved. Meaning is in English and comes back ok. I tried to pinpoint where it's going wrong, hence the string kanji line. String test = "\u3088" = よ. (yo) I've been reading about utf16 and utf8 byte ordering, I've looked at formatters and tried to parse the strings to unicode characters, which came back with 63 - ascii question mark. So, it appears it's getting question marks from the access database - I didn't know whether to post this Q here or in the DB section, but my DB connection works ok...

Failing a quick workaround or fix - can anyone suggest how I *should* be storing up to several thousand lines of data for a kanji quiz type app? eg access, mysql, txt file etc... I thought an access connection would be quicker / better than byte parsing a text file... Oh well...

Help me obi wan! lol!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39087
    
  23
Welcome to JavaRanch

Since we have a forum dedicated to database-related questions, I shall move this thread there.
 
GeeCON Prague 2014
 
subject: Retrieving Japanese data from an access database