• Post Reply Bookmark Topic Watch Topic
  • New Topic

InputStreamReader and Conversion of encoding  RSS feed

 
Joseph Tsui
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to use the InputStreamReader to convert String that retrieve from a html page from Big5 to UTF-8.
previously, it works fine with jdk 1.5

After i upgraded to jdk 1.6 , it returns me the error as below

java.io.UnsupportedEncodingException: big5
at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)

I find that the charset supported by both version are different

How to make it work in 1.6 if i want to use some charset that previously supported ?

thanks in advance
 
Alan Moore
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Big5 works fine on my machine (WinXP, JDK 1.6);
 
Joseph Tsui
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply, yes, it's working now. previously the charsets.jar is not loaded
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!