aspose file tools*
The moose likes Java in General and the fly likes Retrieving japanese characters through jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Retrieving japanese characters through jdbc" Watch "Retrieving japanese characters through jdbc" New topic
Author

Retrieving japanese characters through jdbc

ranga rajan
Greenhorn

Joined: Sep 25, 2002
Posts: 4
Iam using Jdk1.3 and Oracle 8.1.7. My OS is in english.
The NLS of Oracle database is set to UTF8.
The oracle database contains japanese characters. Iam using a java
program to fetch these japanese characters. Iam using JDBC to do this.
When i fetch this data and display it on the console or write into a file,
it is written as '?'(Question marks.)
I even changed the setting of my OS to support japanese, even then this
continues.
can anyone help me on this.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Adding Asian language fonts to the Java Runtime by editing the font.properties files
And rangarajan,
Please change your name to be compliant with JavaRanch's naming policy.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
You can change your name: here.
Thanks,
Cindy


"JavaRanch, where the deer and the Certified play" - David O'Meara
ranga rajan
Greenhorn

Joined: Sep 25, 2002
Posts: 4
Cindy,
I am now able to write the japanese characters retrieved from the database into a file.
Iam also able to read the content of the file and display the content on the console. The displayed characters are proper japanese characters. This i did using the encoding in outputstream objects and did not make any changes in the font.properties.
Now my problem is as follows. Iam not able to store the correct japanese characters directly into a string without writing in the file.
Can u help on this
ranga rajan
Greenhorn

Joined: Sep 25, 2002
Posts: 4
This problem has been solved. Run the java application using
java -Dfile.encoding=cp943 <Class name>
If u are calling a method of a class from another class u can set this system property using the methods in system and then retrieve those system properties to set ur character set.
This is for the information of all those guys who are suffering as i did.
regards
Rangarajan
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
, Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrieving japanese characters through jdbc