man, 19.07.2004 kl. 14.58 skrev Emmanouil Batsis: > There this system property you can set but I can't remember it, it's > used as the encoding to use when reading files... > > Anyway, I always edit my .jsp and .properties using UTF-8, then pass > them through the native2ascii ant task during my build. It's just a > wrapper for the same-named JDK binary; you can use that directly if you > dont use Ant. Works great.
Yes, I know. I am using that one for my resource files. But In my opinion, it should not be necessary to convert the encoding for that file(s) either. Somewhere behind the scenes there is a java.util.Properties class used, and that class assumes iso-8859-1. http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#encoding Encodings should be as transparent as possible, not the assumptions of some developers. Since I am developing and deploying on utf-8 encoding platforms, everything should be smooth, but it is not. I discovered that Struts use iso-8859-1 as default (same as java.util.Properties), and in order to override this setting I have to put a <% @page ... %> directive on every jsp. Ant can really native2ascii'ify all of this, but what about the one who have to administer this mess? When I am on my way to the next job, and they find a misspelling or they have to change some stuff in either the jsp or a resource file lokking like this (arbitrary Norwegian text): Sp\u00f8rsm\u00e5lsgruppen slettet, tilh\u00f8rende sp\u00f8rms\u00e5l eksisterer fortsatt I wish encodings were as simple as they could be (everyone used utf-8) ;-) -- Olve SÃther Hansen <[EMAIL PROTECTED]> Intermedia/Aksis - Unifob AS --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]