Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsupportedEncodingException: SJIS

 
Valentin Mone
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic