alfresco share wrong utf-8 encoding
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2013 04:50 PM
Hello all,
i hava a problem and i need your help.
I want to see in my pages characthers like șțâîă overriding the common.properties and slingshot.properties, but i don't know how.
just an example:
- original
header.logout.label=Logout
header.logout.description=Logout
- translated
header.logout.label=Ieșire
header.logout.description=Ieșire
but insted of È™ i have other characters. I tried hex and asci code, but in some browser are ok, in other not.
What i tried:
I.
1. i edited slingshot.properties with proper translation, but after restart i saw wrong charachters
2. i edited slingshot_en.properties with proper translation, but after restart i saw wrong charachters
3. i created slingshot_ro.properties with proper translation, but after restart i saw wrong charachters
4. just for test: i modified the header_en.properties… same result
file encoding = utf-8
web page meta = utf-8
II.
i. created my own dashlets with myown.properties file and all characthers are ok, utf-8.
So… i realy don't know what can i need to do.
Pleas give me some guides.
Thank you all,
Geo
[SOLVED]
Simple, but not so obvious for me.
i take as example french translation and i saw file encodin = us-asci and special character encoded as ECMAScript.
So my characters look like this:
ă ș ț î â = \u0103 \u0219 \u021b \xee \xe2
now it's work ok
i hava a problem and i need your help.
I want to see in my pages characthers like șțâîă overriding the common.properties and slingshot.properties, but i don't know how.
just an example:
- original
header.logout.label=Logout
header.logout.description=Logout
- translated
header.logout.label=Ieșire
header.logout.description=Ieșire
but insted of È™ i have other characters. I tried hex and asci code, but in some browser are ok, in other not.
What i tried:
I.
1. i edited slingshot.properties with proper translation, but after restart i saw wrong charachters
2. i edited slingshot_en.properties with proper translation, but after restart i saw wrong charachters
3. i created slingshot_ro.properties with proper translation, but after restart i saw wrong charachters
4. just for test: i modified the header_en.properties… same result
file encoding = utf-8
web page meta = utf-8
II.
i. created my own dashlets with myown.properties file and all characthers are ok, utf-8.
So… i realy don't know what can i need to do.
Pleas give me some guides.
Thank you all,
Geo
[SOLVED]
Simple, but not so obvious for me.
i take as example french translation and i saw file encodin = us-asci and special character encoded as ECMAScript.
So my characters look like this:
ă ș ț î â = \u0103 \u0219 \u021b \xee \xe2
now it's work ok
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2013 01:42 PM
You are right, that's the right solution.
Java .properties files are supposed to contain ASCII only characters and all the rest must be encoded to their unicode equivalents. I think it might be more forgivin with ISO-8859-1 encoded files, but not others.
In fact I think the Alfresco build scripts preprocess all .properties files and encode all non ASCII characters for you, but obviously that only works at build time, not if you edit the .properties files later.
Java .properties files are supposed to contain ASCII only characters and all the rest must be encoded to their unicode equivalents. I think it might be more forgivin with ISO-8859-1 encoded files, but not others.
In fact I think the Alfresco build scripts preprocess all .properties files and encode all non ASCII characters for you, but obviously that only works at build time, not if you edit the .properties files later.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2013 04:55 AM
Is this the only way you have found to display non-latin characters? For Greek language, for example, it is impossible to just use UTF-8 codes for text. One would have to transform every single letter!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2013 05:40 AM
Well AFAIK your best option is to write the .properties file in whatever codec you want, probably UTF8 in order to be able to use greek characters and then encode it using native2ascii tool (included in the JRE i think).
There is a "newer" way of specifying properties files by an XML format. There you can use UTF8 or probably any other codec as long as you declare it in the XML file. But Alfresco is not using this format for internationalization so I think you can not use it in this context.
There is a "newer" way of specifying properties files by an XML format. There you can use UTF8 or probably any other codec as long as you declare it in the XML file. But Alfresco is not using this format for internationalization so I think you can not use it in this context.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2013 12:32 PM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 01:49 AM
I am using the ResourceBundle Editor Eclipse Plugin for years:
http://eclipse-rbe.sourceforge.net/screenshots.htm
In Eclipse Settings, you can turn on/off parameters to automatically convert \uXXX values to readable characters for display and convert them back to \uXXX codes when writing to files
http://eclipse-rbe.sourceforge.net/screenshots.htm
In Eclipse Settings, you can turn on/off parameters to automatically convert \uXXX values to readable characters for display and convert them back to \uXXX codes when writing to files
