Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » plugin.xml, i18n and umlauts
plugin.xml, i18n and umlauts [message #997726] Tue, 08 January 2013 16:03 Go to next message
Frank K is currently offline Frank KFriend
Messages: 3
Registered: January 2013
Junior Member
Hello,

been using i18n functionality for a while now without any problems. Now we tried to translate a new bundle into German and it is the first time that we have umlauts in some titles coming from plugin.xml or more exactly from plugin_de.properties.

The property file itself is encoded in UTF-8 without BOM.
We are using RAP 1.5.1 (running in equinox) and the error occurs with Firefox 17 and IE 8.
Re: plugin.xml, i18n and umlauts [message #998059 is a reply to message #997726] Wed, 09 January 2013 09:30 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1296
Registered: July 2009
Senior Member

Hi Frank,

It's weird, but Java .property files have to be Latin-1-encoded for
historical reasons. If you have non-latin characters, you need to encode
them using the native2ascii tool that is shipped with the JDK. Please
check the Javadoc of the Properties class for details.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: plugin.xml, i18n and umlauts [message #998126 is a reply to message #998059] Wed, 09 January 2013 12:23 Go to previous messageGo to next message
Frank K is currently offline Frank KFriend
Messages: 3
Registered: January 2013
Junior Member
Thank you Ralf, I was afraid it could be something like that.

Are there any plans to change this historical behavior?

At the moment this means we have two different kind of property files:

- one for the plugin.xml files encoded in ISO-8859-1
- property files encoded in UTF-8 for all the other labels in our application

Of course, we could also define just to have ISO-8859-1 property files everywhere, but I don't like this idea either...
I mean for European languages ISO is not such a big deal, but when talking about all the eastern languages it is.
Re: plugin.xml, i18n and umlauts [message #999166 is a reply to message #998126] Fri, 11 January 2013 13:44 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1296
Registered: July 2009
Senior Member

> Are there any plans to change this historical behavior?

In Java 1.6, the class PropertyResourceBundle has a new constructor that
accepts a Reader instead of an InputStream [1]. Using this constructor
allows to read a property file in any encoding.

I don't know if there are plans in Equinox to support non-Latin
plugin.property files, but that would certainly be worth a feature request.

Cheers, Ralf

[1]
http://docs.oracle.com/javase/6/docs/api/java/util/PropertyResourceBundle.html#PropertyResourceBundle%28java.io.Reader%29

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: plugin.xml, i18n and umlauts [message #1001390 is a reply to message #997726] Wed, 16 January 2013 16:07 Go to previous message
Frank K is currently offline Frank KFriend
Messages: 3
Registered: January 2013
Junior Member
Thank you, Ralf. A feature request is really a good idea.

Did that, let's see what happens. Wink

https://bugs.eclipse.org/bugs/show_bug.cgi?id=398304


Cheers,
Frank
Previous Topic:Custom Theme Override
Next Topic:Operation "listen" on target "w4" of type "rwt.widgets.MenuBar" failed
Goto Forum:
  


Current Time: Mon Dec 22 19:52:41 GMT 2014

Powered by FUDForum. Page generated in 0.04472 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software