views:

197

answers:

2

Hi.

I want to write a simple java web app that takes japanese characters and stores in db.(Oracle). My server is tomcat.

What are the things I need to ensure, rather what all places my encoding should be set correctly? I have UTF-8 in my IDE, and probably database config is also set to UTF-8. Would that be enough?

Does my server config needs to be modified to support transmission of Japanese characters?

Any pointers to sample application will be very much appreciated.

Cheers

+1  A: 

UTF-8 is a good encoding choice, but not the only one.

You should be aware if you're using Microsoft products that they don't support UTF-8 natively. They have their own "standard" encoding called UCS-2. You say Java and Oracle, so perhaps the warning isn't needed, but I didn't know if you have IIS as your web server, so I thought I'd point it out.

You also have to have the Japanese character sets installed on your machine: Kanji, Katakana, and the older Kaiji sets as well.

If you intend to actually type characters in Japanese, you'll need the Japanese IME installed. Here's how to do it.

duffymo
+3  A: 

Hi,

I would check the DB charset with

SELECT *
  FROM SYS.v_$nls_parameters

and check that NLS_CHARACTERSET supports Japanesse (for example and not limited to: AL32UTF8, AL16UTF16)

ATorras