• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

UnsupportedEncodingException: SJIS

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic