tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schuerig <mich...@schuerig.de>
Subject Re: JDT-Compiler character encoding
Date Wed, 08 Sep 2004 18:13:37 GMT
On Wednesday 08 September 2004 16:07, Michael Schuerig wrote:

> There seem to be two possible causes for the incorrect output
>
> the JDT compiler doesn't behave as advertised, i.e., it does not take
> UTF-8 as default input encoding. *Or* the JDT compiler produces
> character output in UTF-8 which is latter erroneously treated as
> ISO-8859-1.

Precompiled with Ant javac, encoding="UTF-8":
java:
      out.write("\n\n    TEST\n    
\n\tÀöÌÃ<84>Ã<96>Ã<9C>Ã<9F>\n\t\n\t");

decompiled class:
        out.write("\n\n    TEST\n    
\n\t\344\366\374\304\326\334\337\n\t\n\t");


Server compiled (without javaEncoding set in web.xml):
java:
      out.write("\tÀöÌÃ<84>Ã<96>Ã<9C>Ã<9F>\n");
decompiled class:
      out.write("\t\303\u20AC\303\266\303\u0152\303\204\303\226\303\234\303\237\n");


Server compiled (with javaEncoding ISO-8859-1 set in web.xml):
java:
      out.write("\täöüÄÖÜß\n");
decompiled class:
      out.write("\t\344\366\374\304\326\334\337\n");


Something's amiss here. Apparently, by default the JDT compiler does not 
take UTF-8 input correctly, rather it seems to expect ISO-8859-1.

Now, is this a bug or am I misunderstanding something?

Michael

-- 
Michael Schuerig                 Nothing is as brilliantly adaptive
mailto:michael@schuerig.de       as selective stupidity.
http://www.schuerig.de/michael/    --A.O. Rorty, The Deceptive Self

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message