wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes UnsupportedEncodingException: SJIS 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 » I/O and Streams
Bookmark "UnsupportedEncodingException: SJIS" Watch "UnsupportedEncodingException: SJIS" New topic
Author

UnsupportedEncodingException: SJIS

Valentin Mone
Greenhorn

Joined: Nov 05, 2006
Posts: 24
Hi,

I'm kind of new to String encoding and I have the following problem.
What I have to do is to parse a csv file, which the one who made it said is encoded with SHIFT_JIS, and I open it this way:


The problem is that it crashes when file is opened with java.io.UnsupportedEncodingException: SJIS.
Any help is appreciated. Thanks.
Valentin Mone
Greenhorn

Joined: Nov 05, 2006
Posts: 24
A thing that i've noticed is that the csv file contains also english words (for the 3 column names), number for first column, and the remaining 2 columns contains unreadable text(which is the japanise text). So is it posible for a file to be partially encoded with UTF-8, and partially encoded with Shift_JIS? If so, how do I parse it?
[ July 24, 2007: Message edited by: Valentin Mone ]
Valentin Mone
Greenhorn

Joined: Nov 05, 2006
Posts: 24
Ok, seems people is out on vacation, or does not have time for answers .
Just so you know, problem was that "charsets.jar" was not in the JRE/lib directory. If you have this problem, copy jar to that folder and problem is solved. I got the jar file from /jdk/jre/lib.

Cheers
Valentin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UnsupportedEncodingException: SJIS
 
Similar Threads
null strings
How to read a text file into a Vector of Points?
How to append text to the end of a text file?
getting text to appear in the JOptionPane function
plz delete