I had a look at T5 and Spring code : - Spring checks if the JDK supports UTF-8 files, and if it does not support it acts like T4 and parses the properties file. The implementation is much more compact than in T4.
- T5 does a native2ascii conversion of the properties files on the fly. So I figured out a quick patch that is a combination of the 3 methods : - try to use JDK 6 native implementation - if not available then convert on the fly to ASCII and use native JDK <=5 properties The result is in the attachment file (sorry but I don't have a quick way to do a patch file against SVN trunk at the moment). The method readUTFStreamToEscapedASCII is directly borrowed from T5.1 (Apache License 2.0), and I slightly modified PropertiesFilePropertiesLoader constructor and loadProperties().Tell me what you think of that. I only runed the Maven build on wicket-1.4.1 to check that the unit tests are not broken. I think that I should use application.getMarkupSettings().getDefaultMarkupEncoding() to set the encoding of my InputStream, but when doing this the unit tests fail with NullPointerException (and I don't have taken the time to look deeper into this). 2009/9/2 Maarten Bosteels <mbosteels....@gmail.com>: > FYI, spring supports UTF-8 property files as well: > > see org.springframework.context.support.ReloadableResourceBundleMessageSource > > Maarten >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org