Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to deal with Unicode file?

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

it does work, but if i change UTF-8 to Unicode, it throws a UnsupportedEncodeException, so how to load a unicode file?
 
Kirk Bateman
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't properly...

You can only open supported file encodings using your method..

the other way is to use \uXXXX unicode codes and convert them when you load



Cheers

Kirk Bateman
Synaptic Technologies Limited
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried with "UCS-2"?

Cheers,
Eduardo

Originally posted by HaoZhe XU:

it does work, but if i change UTF-8 to Unicode, it throws a UnsupportedEncodeException, so how to load a unicode file?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!