DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26380>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26380 Unable to read UTF-8 encoded app.properties Summary: Unable to read UTF-8 encoded app.properties Product: Struts Version: Unknown Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, It really sucks that you have to send your .properties-files through the native2ascii converter and get some unreadable gibberish with \uXXXX. I realize that even Java doesn't support UTF-8 .properties-files, but writing a loader is simple: public static Properties loadProperties( String filename) throws Throwable { Properties result = new Properties(); BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( filename), "UTF-8")); String read = reader.readLine(); while( read != null) { if( !read.startsWith( "#") && !read.startsWith( ";") && read.indexOf( '=') != -1) result.setProperty( read.substring( 0, read.indexOf( '=')), read.substring( read.indexOf( '=')+1, read.length())); read = reader.readLine(); } return result; } Maybe an encoding-attribute could be thrown into the <message-resources>- tag in struts-config.xml? Regards, Torben Vesterager --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
