This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "UnsupportedEncodingException: SJIS" Watch "UnsupportedEncodingException: SJIS" New topic

UnsupportedEncodingException: SJIS

Valentin Mone

Joined: Nov 05, 2006
Posts: 24

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 SJIS.
Any help is appreciated. Thanks.
Valentin Mone

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

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.

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