[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Japanese MSAcess Unicode

I'm useing NetBeans IDE for Java and MS Access 2003

I want to read and write Japanese characters from my Java App to a MS Access database. I am using the Windows XP Language toolbar IME to input the characters into the Java app and manually into MS Access.

I did some reading on the sun forum and it seemed like some people thought the XP lang toolbar input characters using UTF-16, but Java isn't able to read UTF-16... maybe? I would rather not do any hacks to get around this encoding problem.

I would love any help or options on what to do.

Thanks!
0
really24
Asked:
really24
  • 2
  • 2
  • 2
  • +3
1 Solution
 
CEHJCommented:
>>Java isn't able to read UTF-16... maybe?

On the contrary, not only can it, but effectively it's Java's native encoding (it uses a modified UTF-16 internally)
0
 
hoomanvCommented:
have a look at http://mindprod.com/jgloss/encoding.html
may be you can use other encodings like i.e. JIS0201 for japanese
0
 
objectsCommented:
From the javadoc

"A String represents a string in the UTF-16 format in which supplementary characters are represented by surrogate pairs (see the section Unicode Character Representations in the Character class for more information). Index values refer to char code units, so a supplementary character uses two positions in a String."

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
isaihatCommented:
Execute the following command in database before begin ur program
execute("SET CHARACTER SET 'latin2'")
0
 
isaihatCommented:
or any language u use
0
 
really24Author Commented:
I just found this today. Here's the problem with UTF-16

JDBC-ODBC Bridge still does not support Unicode UTF-16

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6345277
0
 
CEHJCommented:
Yes, i feared that might be a problem. It's not Java itself. That bridge is pretty ancient AFAIK
0
 
objectsCommented:
> JDBC-ODBC Bridge still does not support Unicode UTF-16

Thats right, bridge is only intended for testing and is not intended for serious use.
You'll need to get a 3rd party driver for any serious work.
0
 
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now