After more than 10 years using .properties and I did not twig that it may be the .properties encoding limitation.
After an hour and a touch of RSA all .properties are now xml and it's working great. Thanks for the tip. And thanks Maarten for the pointer to Spring resource bundles. Tim > Hi Tim, > > .properteis files are ALWAYS in ISO59something encoding (see the Javadoc > to > java.lang.Properties. If you want to use a different encoding, you'll have > to either recode your properties files, use xml properties or somehow load > the .properties files yourself. > > Thomas > > On Mon, Feb 16, 2009 at 2:04 PM, Tim Squires <[email protected]> wrote: > >> Hi, >> >> I have been sent Russian translations to my default English pages. >> Wicket >> picks up the _ru.properties bundles correctly but somewhere along the >> way, >> the encoding is not changing from UTF-8. I gather that the Russian >> translated pages will need an encoding of cp1251. >> >> I have tried to force the encoding in the Page template using >> >> protected void configureResponse() { >> super.configureResponse(); >> final String encoding = "text/" + getMarkupType() + "; >> charset=cp1251"; >> getResponse().setContentType(encoding); >> } >> >> and in the application class >> >> @Override >> protected void init() { >> super.init(); >> getMarkupSettings().setDefaultMarkupEncoding("cp1251"); >> } >> >> but still Firefox and IE in Linux and Win show a page encoding of UTF-8. >> >> From the wiki >> >> http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html >> >> and other mail, it looks like it's a problem outside of Wicket but I was >> hoping someone here would know a fix. >> >> You can see the test version at http://imagebank.crystalmark.co.uk >> >> I'm pretty sure my pc's are setup OK because I can see other Russian >> websites ok (although I cannot actually read them). >> >> Can anyone point me to what I have missed? >> >> Thanks, >> Tim >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > Thomas Mäder > Wicket & Eclipse Consulting > www.devotek-it.ch > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
