rehamaltamimi / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

Properties file encoding #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use "spanish" locale (new Locale("es")) on a spanish wikipedia dump
2. no category is identified

What is the expected output? What do you see instead?

Categories should be should, as the Messages_es.properties file is defined
and the category property is set correctly. I guess the problem occurs on
other locales too.

What version of the product are you using? On what operating system?

3.0.13

Please provide any additional information below.

Using the following properties file, it works correctly :

iki.tags.toc.content=Contenido
wiki.api.url=http://es.wikipedia.org/w/api.php
wiki.api.category1=Categor\u00EDa
wiki.api.image1=Imagen
wiki.api.template1=Plantilla
wiki.api.category2=Category
wiki.api.image2=Image
wiki.api.template2=Template

It makes me think the original properties file have been stored using utf-8
encoding although properties files are expected to be written in
iso-8859-1, whatever the system encoding. You should replace special
characters in the file with their standard Java unicode representation.

Original issue reported on code.google.com by cedric.c...@gmail.com on 23 Oct 2009 at 2:57

GoogleCodeExporter commented 8 years ago
Is there an official web page, wehre I can found this rule?

Original comment by axelclk@gmail.com on 23 Oct 2009 at 3:16

GoogleCodeExporter commented 8 years ago
About properties file encoding ? Sure, on the javadoc :

http://java.sun.com/javase/6/docs/api/java/util/Properties.html

"The load(InputStream) /  store(OutputStream, String)  methods work the same 
way as
the load(Reader)/store(Writer, String) pair, except the input/output stream is
encoded in ISO 8859-1 character encoding. Characters that cannot be directly
represented in this encoding can be written using Unicode escapes  ;"

Original comment by cedric.c...@gmail.com on 23 Oct 2009 at 3:19

GoogleCodeExporter commented 8 years ago
See
http://code.google.com/p/gwtwiki/source/detail?r=932
http://code.google.com/p/gwtwiki/source/detail?r=933

Original comment by axelclk@gmail.com on 31 Jan 2010 at 12:28

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 31 Jan 2010 at 12:29