Monday, September 17, 2007

Dev : EUC_CN

Wow... something so alien to me. I encounter this encoding error during a test run on a project.

java.io.UnsupportedEncodingException: EUC_CN at sun.io.Converters.getConverterClass(Unknown Source) at sun.io.Converters.newConverter(Unknown Source) at sun.io.CharToByteConverter.getConverter(Unknown Source) at java.lang.StringCoding.encode(Unknown Source) at java.lang.String.getBytes(Unknown Source) at
:
:

I have no idea what is wrong and I definately didn't have any problem on my browser's encoding because I have run this projects million of times on my workstation. I turned in to my sifu when my brain juice started leaking out. Unlike me who had use the whole morning trying to figure out what the f*** is this, my sifu just took 5 minutes to solve my misery, and he told me that it is actually the problem of my jdk. I am using 1.4 for this particular tomcat and if I change to 1.5, it will definately work. He showed me an article of the problem too.

Yeah. It really works! Cool...