InputStreamReader(fis, "ISO-2022-JP") gives unsupportedEncodingException

Hi all,

I am trying to print Japanese characters on an html page using a servlet. I am getting unsupportedEncodingException when I try -

res.setContentType("text/plain; charset=Shift_JIS");

and also -

InputStreamReader(fis, "ISO-2022-JP") when I try to read the japanese words from a file.

Please if someone could help me that would be great.

I am using Apache 1.3 and Resin 2.0.3 just in case you want to know.

Thanks in advance

[492 byte] By [AvijitSun] at [2007-9-26 15:56:54]
# 1

Well, obviously the encoding is not supported. Is there any reason you should expect it to be supported, that is, do you have i18n.jar and it contains the correct byteToChar converter?

list of supported encodings: http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

What if you spell it like "ISO2022JP"?

jsalonen at 2007-7-2 19:06:34 > top of Java-index,Core,Core APIs...
# 2
Isn't Shift_JIS referred as SJIS in i18?
Mracka at 2007-7-2 19:06:34 > top of Java-index,Core,Core APIs...
# 3
Maybe could help "JISAutoDetect".
Mracka at 2007-7-2 19:06:34 > top of Java-index,Core,Core APIs...