Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving Japanese data from an access database  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Marshal
Posts: 59086
180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Since we have a forum dedicated to database-related questions, I shall move this thread there.
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!