Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UnsupportedEncodingException in browser 1

Status
Not open for further replies.

rtgordon

Programmer
Jan 17, 2001
104
US
Any idea what would cause this error in a web browser, but not from the command line? I have an active server page that calls a java program that does an MQSeries query to the mainframe, and returns a message to the web browser. It is my understanding that the data comes back in EBCDIC, and java using MQSeries classes converts it to code page 437 (PC Original). This is what the browser returns:

java.io.UnsupportedEncodingException: 437 [Could not load class: sun.io.ByteToCharCp437]

If I run it from the command line, it returns fine. Any thoughts from a java perspective?

Thanks,
gordon
 
What browser are you using? I bet it's an older one, if it isn't the latest version of Netscape or IE then download Opera at & select With Java. Then you should be able to run you applet. If you are using a new version of Netscape or IE then download an older version of them & that should work. This is because the older versions of Netscape & IE created their own classes that they used for stuff that java didn't support at the time. Now we have java 2 & Sun has made all the browsers use their version of java by making the user download a special java package when a new one comes out. This makes older types of java incompatible with newer browsers & java 2 incapatible with older browsers. If you are programing in older java then you need an older browser, if you are programming in java 2 then you need a newer browser, I suggest Opera from using it will allow you to have older versions of Nectscape & IE. You will then be able to go to sites using older java applets with Netscpae & IE, and use Opera to open sites with newer java applets using java 2.
 
Hmmm... that may work, too, but I just figured out my problem. I guess that sun supports characterSet 437, but when run from IE 5 (which uses the Microsoft JVM), it doesn't support it. I changed it to 819 (ISO 8859-1 / Latin / ibm819), and it works fine.

Thanks!
gordon
 
hmmm... I guess that I wasn't thinking of IE 5+ as being older.

gordon
 
I don't keep up with the new versions of IE so I don't know what the latest version is. I know that the only version of Netscape to support java 2 is the brand new Netscape 6.0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top