Issue 22 in gwtwiki: Properties file encoding

3 views
Skip to first unread message

gwt...@googlecode.com

unread,
Oct 23, 2009, 10:57:52 AM10/23/09
to bl...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 22 by cedric.c...@gmail.com: Properties file encoding
http://code.google.com/p/gwtwiki/issues/detail?id=22

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.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

gwt...@googlecode.com

unread,
Oct 23, 2009, 11:17:18 AM10/23/09
to bl...@googlegroups.com
Updates:
Owner: axelclk

Comment #1 on issue 22 by axelclk: Properties file encoding
http://code.google.com/p/gwtwiki/issues/detail?id=22

Is there an official web page, wehre I can found this rule?

gwt...@googlecode.com

unread,
Oct 23, 2009, 11:25:43 AM10/23/09
to bl...@googlegroups.com

Comment #2 on issue 22 by cedric.c...@gmail.com: Properties file encoding
http://code.google.com/p/gwtwiki/issues/detail?id=22

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 ;"

Reply all
Reply to author
Forward
0 new messages