wood burning stoves 2.0*
The moose likes JSP and the fly likes Internationalisation - Japanese Characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Internationalisation - Japanese Characters" Watch "Internationalisation - Japanese Characters" New topic
Author

Internationalisation - Japanese Characters

Kirtikumar Puthran
Ranch Hand

Joined: Mar 04, 2003
Posts: 37
Hi,
I am trying to insert Japanese data retrieved from a JSP page having
"shift-jis" charset into an UTF-8 oracle database.
I am using the following code to get the user input from the Form text box
field as follows:
String textboxString = request.getParameter("japaneseText");
String original = new
String(textboxString.getBytes("8859_1"));
byte[] JISBytes = original.getBytes("Shift_JIS");
String insertToDB = new String(JISBytes, "UTF8");
The string is then inserted in a UTF-8 database
But when the string is retrieved from the database using Java or Perl code,
the result is seen as junk "Mojibake" characters.
Note : When the data is inserted using a Perl script, the data is inserted
properly and the results are also retrieved properly in Japanese characters.
I would appreciate if someone could throw some pointers on this issue.
Rgds,
Kirti


Regards,<br />Kirti
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Internationalisation - Japanese Characters
 
Similar Threads
Problem encoding japanese character
Inserting Japanese text into Oracle database
Inserting Japanese text into Oracle database
Display problem with Japanese characters
Inserting Japanese text into Oracle database