I use the eclipse resource bundle editor. It takes care of escape sequences besides being a cool .properties translator helper.
Gabriel. On Tue, 2011-01-11 at 17:20 +0100, [email protected] wrote: > Uaaaaaaaaah > > The translation property files are loaded in this manner > > InputStream in = url.openStream(); > properties.load(in); > reader.close(); > > The load method of the Properties class requires ISO-8859. > > http://download.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html#load%28java.io.InputStream%29 > > Special chars have to be escaped with \u. > > This is extremly unlucky,making translations will drive you crazy. > > Since Java 1.6, you can do the following > > InputStream in = url.openStream(); > InputStreamReader reader = new InputStreamReader(in); > properties.load(reader); > reader.close(); > > I tested this sequence, works perfectly, but only for Java 1.6 > > Another possibility is to use > http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/native2ascii.html > This possibility requires to store 2 files, > GeoServerApplication.properties and GeoServerApplication.utf8, the > second for editing, the first for geoserver. > > > Opinions ? > Cheers > Christian > > > Quoting Justin Deoliveira <[email protected]>: > > > I would say using UTF encoding for files probably makes most sense. The > > question is where in the code are the files being read in a way that does > > not respect the file encoding. My guess would be in the > > GeoServerResourceStreamLocator class where we read the property file. > > > > On Tue, Jan 11, 2011 at 7:39 AM, <[email protected]> wrote: > > > >> Hi, I have a set of of GeoServerApplication_de.properties files for a > >> German translation for the GeoServer admin GUI. > >> > >> The files are encoded UTF-8. > >> > >> I can see the German special characters on linux /windows with any > >> editor or browser, only the geoserver admin GUI displays garbage. > >> > >> The majority off the property files are ASCII text, some of them are > >> UTF-8, an an example for French > >> > >> ./wms/src/main/resources/GeoServerApplication_fr.properties: UTF-8 > >> Unicode English text > >> > >> Is it possible to use UTF-8 or do I have to recode ? > >> > >> > >> > >> > >> ---------------------------------------------------------------- > >> This message was sent using IMP, the Internet Messaging Program. > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> Gaining the trust of online customers is vital for the success of any > >> company > >> that requires sensitive data to be transmitted over the Web. Learn how to > >> best implement a security strategy that keeps consumers' information secure > >> and instills the confidence they need to proceed with transactions. > >> http://p.sf.net/sfu/oracle-sfdevnl > >> _______________________________________________ > >> Geoserver-devel mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/geoserver-devel > >> > > > > > > > > -- > > Justin Deoliveira > > OpenGeo - http://opengeo.org > > Enterprise support for open source geospatial. > > > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel -- Gabriel Roldan [email protected] Expert service straight from the developers ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
