Arabic characters not appearing correctly from .properties file

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Arabic characters not appearing correctly from .properties file

aabfattah
Hello ,
I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that :
يجب ادخال اسم الدخول
Although I wrote all HTML in Arabic and it displays correctly

I am using Eclipse Helios and I set workspace encoding to UTF-8
Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Andrea Del Bene-2
Hi,

try starting your web server with these parameters:

-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Andrea Del Bene-2
In reply to this post by aabfattah
...or try these instructions

http://davidbits.blogspot.com/2010/12/how-to-change-tomcat-default-character.html

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

aabfattah
I am not using tomcat , I am using jetty .
I guess the problem is in properties files encoding.

On 20 September 2011 13:05, Andrea Del Bene-2 [via Apache Wicket] <[hidden email]> wrote:
...or try these instructions

http://davidbits.blogspot.com/2010/12/how-to-change-tomcat-default-character.html

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




To unsubscribe from Arabic characters not appearing correctly from .properties file, click here.



--
Ahmed Abdelfattah


Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martijn Dashorst
Administrator
In reply to this post by aabfattah
This also only works on Java 6 and newer (UTF-8 support for properties
files is a java 6 feature).

Martijn

On Tue, Sep 20, 2011 at 12:53 PM, aabfattah
<[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

aabfattah
I am using 
jdk1.6.0_23

On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] <[hidden email]> wrote:
This also only works on Java 6 and newer (UTF-8 support for properties
files is a java 6 feature).

Martijn

On Tue, Sep 20, 2011 at 12:53 PM, aabfattah
<[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




To unsubscribe from Arabic characters not appearing correctly from .properties file, click here.



--
Ahmed Abdelfattah


Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

aabfattah
In reply to this post by Martijn Dashorst
I get this info always in console :
INFO  - PropertiesFactory          - Loading properties files from file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace
INFO  - PropertiesFactory          - Loading properties files from jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace

On 20 September 2011 13:21, Ahmed Abdelfattah <[hidden email]> wrote:
I am using 
jdk1.6.0_23

On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] <[hidden email]> wrote:
This also only works on Java 6 and newer (UTF-8 support for properties
files is a java 6 feature).

Martijn

On Tue, Sep 20, 2011 at 12:53 PM, aabfattah
<[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




To unsubscribe from Arabic characters not appearing correctly from .properties file, click here.



--
Ahmed Abdelfattah





--
Ahmed Abdelfattah


Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

aabfattah
In reply to this post by Martijn Dashorst
The problem maybe in 
IsoPropertiesFilePropertiesLoader
In the API it says Load properties from properties file. The encoding of the file must be ISO 8859-1.



On 20 September 2011 13:22, Ahmed Abdelfattah <[hidden email]> wrote:
I get this info always in console :
INFO  - PropertiesFactory          - Loading properties files from file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace
INFO  - PropertiesFactory          - Loading properties files from jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace

On 20 September 2011 13:21, Ahmed Abdelfattah <[hidden email]> wrote:
I am using 
jdk1.6.0_23

On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] <[hidden email]> wrote:
This also only works on Java 6 and newer (UTF-8 support for properties
files is a java 6 feature).

Martijn

On Tue, Sep 20, 2011 at 12:53 PM, aabfattah
<[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




To unsubscribe from Arabic characters not appearing correctly from .properties file, click here.



--
Ahmed Abdelfattah





--
Ahmed Abdelfattah





--
Ahmed Abdelfattah


Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martin Grigorov-4
Better use .properties.xml format.
The XML properties files are much more safe than plain .properties.

See http://java.sun.com/dtd/properties.dtd and
java.util.Properties.loadFromXML(InputStream)

On Tue, Sep 20, 2011 at 2:24 PM, aabfattah
<[hidden email]> wrote:

> The problem maybe in
> *IsoPropertiesFilePropertiesLoader*
> *In the API it says *Load properties from properties file. The encoding of
> the file must be ISO 8859-1.
>
> *
> *
> On 20 September 2011 13:22, Ahmed Abdelfattah <
> [hidden email]> wrote:
>
>> I get this info always in console :
>> INFO  - PropertiesFactory          - Loading properties files from
>> file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties
>> with loader
>> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace
>> INFO  - PropertiesFactory          - Loading properties files from
>> jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties
>> with loader
>> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace
>>
>> On 20 September 2011 13:21, Ahmed Abdelfattah <
>> [hidden email]> wrote:
>>
>>> I am using
>>> jdk1.6.0_23
>>>
>>> On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] <
>>> [hidden email]> wrote:
>>>
>>>> This also only works on Java 6 and newer (UTF-8 support for properties
>>>> files is a java 6 feature).
>>>>
>>>> Martijn
>>>>
>>>> On Tue, Sep 20, 2011 at 12:53 PM, aabfattah
>>>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=3826458&i=0>>
>>>> wrote:
>>>>
>>>> > Hello ,
>>>> > I have written many .properties pages to show error messages in Arabic
>>>> and
>>>> > saved them in UTF-8 format and they display like that :
>>>> > يجب ادخال اسم الدخول
>>>> > *Although I wrote all HTML in Arabic and it displays correctly
>>>> > *
>>>> > I am using Eclipse Helios and I set workspace encoding to UTF-8
>>>> >
>>>> > --
>>>> > View this message in context:
>>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
>>>> > Sent from the Users forum mailing list archive at Nabble.com.
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826458&i=1>
>>>> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826458&i=2>
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826458&i=3>
>>>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826458&i=4>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>  If you reply to this email, your message will be added to the
>>>> discussion below:
>>>>
>>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826458.html
>>>>  To unsubscribe from Arabic characters not appearing correctly from
>>>> .properties file, click here<
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Ahmed Abdelfattah
>>>
>>>
>>>
>>
>>
>> --
>> Ahmed Abdelfattah
>>
>>
>>
>
>
> --
> Ahmed Abdelfattah
>
>
> --
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826476.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martin A
In reply to this post by aabfattah
Hi, Ahmed,

As the Java specification defines, the .properties file contains only
characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
arabic characters in a properties file.

You have two options here:

   1. Unicode escape your arabic characters, using converters, like this one
   here > http://www.rishida.net/tools/conversion/ (what works for you
   appears under JavaScript escapes) or
   2. Use an xml file for language properties.

Regards,
Martin

On Tue, Sep 20, 2011 at 1:53 PM, aabfattah <
[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

aabfattah
Well , the xml file didn't load and it loaded the default .properties files from wicket 
But the first trick worked :)

On 20 September 2011 13:41, Martin A [via Apache Wicket] <[hidden email]> wrote:
Hi, Ahmed,

As the Java specification defines, the .properties file contains only
characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
arabic characters in a properties file.

You have two options here:

   1. Unicode escape your arabic characters, using converters, like this one
   here > http://www.rishida.net/tools/conversion/ (what works for you
   appears under JavaScript escapes) or
   2. Use an xml file for language properties.

Regards,
Martin

On Tue, Sep 20, 2011 at 1:53 PM, aabfattah <
[hidden email]> wrote:

> Hello ,
> I have written many .properties pages to show error messages in Arabic and
> saved them in UTF-8 format and they display like that :
> يجب ادخال اسم الدخول
> *Although I wrote all HTML in Arabic and it displays correctly
> *
> I am using Eclipse Helios and I set workspace encoding to UTF-8
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



To unsubscribe from Arabic characters not appearing correctly from .properties file, click here.



--
Ahmed Abdelfattah


Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martijn Dashorst
Administrator
In reply to this post by Martin A
On Tue, Sep 20, 2011 at 1:41 PM, Martin A <[hidden email]> wrote:
> Hi, Ahmed,
>
> As the Java specification defines, the .properties file contains only
> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
> arabic characters in a properties file.

Wrong: with Java 6 you can load properties files written in UTF-8 (or
any encoding for that matter):

http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771

Martijn

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martin Grigorov-4
On Tue, Sep 20, 2011 at 3:18 PM, Martijn Dashorst
<[hidden email]> wrote:

> On Tue, Sep 20, 2011 at 1:41 PM, Martin A <[hidden email]> wrote:
>> Hi, Ahmed,
>>
>> As the Java specification defines, the .properties file contains only
>> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
>> arabic characters in a properties file.
>
> Wrong: with Java 6 you can load properties files written in UTF-8 (or
> any encoding for that matter):
>
> http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771

This is what our
org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader does
actually.
>
> Martijn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Christian Huber
In reply to this post by aabfattah
Just a short addition, the resource bundle editor plugin for eclipse is
great for handling .properties files with UTF-8 characters. The files
are stored with ISO encoding and UTF-8 characters are escaped correctly
while you can use the unescaped in the editor.

The Sanity Resort <http://sanityresort.blogspot.com/>

Am 20.09.2011 13:50, schrieb aabfattah:

> Well , the xml file didn't load and it loaded the default .properties files
> from wicket
> But the first trick worked :)
>
> On 20 September 2011 13:41, Martin A [via Apache Wicket]<
> [hidden email]>  wrote:
>
>> Hi, Ahmed,
>>
>> As the Java specification defines, the .properties file contains only
>> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
>>
>> arabic characters in a properties file.
>>
>> You have two options here:
>>
>>     1. Unicode escape your arabic characters, using converters, like this
>> one
>>     here>  http://www.rishida.net/tools/conversion/ (what works for you
>>     appears under JavaScript escapes) or
>>     2. Use an xml file for language properties.
>>
>> Regards,
>> Martin
>>
>> On Tue, Sep 20, 2011 at 1:53 PM, aabfattah<
>> [hidden email]<http://user/SendEmail.jtp?type=node&node=3826499&i=0>>
>> wrote:
>>
>>> Hello ,
>>> I have written many .properties pages to show error messages in Arabic
>> and
>>> saved them in UTF-8 format and they display like that :
>>> يجب ادخال اسم الدخول
>>> *Although I wrote all HTML in Arabic and it displays correctly
>>> *
>>> I am using Eclipse Helios and I set workspace encoding to UTF-8
>>>
>>> --
>>> View this message in context:
>>>
>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826499&i=1>
>>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3826499&i=2>
>>>
>>>
>>
>> ------------------------------
>>   If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html
>>   To unsubscribe from Arabic characters not appearing correctly from
>> .properties file, click here<
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Martin Grigorov-4
On Tue, Sep 20, 2011 at 3:26 PM, Christian Huber <[hidden email]> wrote:
> Just a short addition, the resource bundle editor plugin for eclipse is
> great for handling .properties files with UTF-8 characters. The files are
> stored with ISO encoding and UTF-8 characters are escaped correctly while
> you can use the unescaped in the editor.

This is an option but not a good one. In my experience the developers
support only the English version of the bundle and the people who
translate to the other languages are not Eclipse (or any other IDE)
users.
The XML is the most convenient, I think.

>
> The Sanity Resort <http://sanityresort.blogspot.com/>
>
> Am 20.09.2011 13:50, schrieb aabfattah:
>>
>> Well , the xml file didn't load and it loaded the default .properties
>> files
>> from wicket
>> But the first trick worked :)
>>
>> On 20 September 2011 13:41, Martin A [via Apache Wicket]<
>> [hidden email]>  wrote:
>>
>>> Hi, Ahmed,
>>>
>>> As the Java specification defines, the .properties file contains only
>>> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot
>>> enter
>>>
>>> arabic characters in a properties file.
>>>
>>> You have two options here:
>>>
>>>    1. Unicode escape your arabic characters, using converters, like this
>>> one
>>>    here>  http://www.rishida.net/tools/conversion/ (what works for you
>>>    appears under JavaScript escapes) or
>>>    2. Use an xml file for language properties.
>>>
>>> Regards,
>>> Martin
>>>
>>> On Tue, Sep 20, 2011 at 1:53 PM, aabfattah<
>>> [hidden email]<http://user/SendEmail.jtp?type=node&node=3826499&i=0>>
>>> wrote:
>>>
>>>> Hello ,
>>>> I have written many .properties pages to show error messages in Arabic
>>>
>>> and
>>>>
>>>> saved them in UTF-8 format and they display like that :
>>>> يجب ادخال اسم الدخول
>>>> *Although I wrote all HTML in Arabic and it displays correctly
>>>> *
>>>> I am using Eclipse Helios and I set workspace encoding to UTF-8
>>>>
>>>> --
>>>> View this message in context:
>>>>
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
>>>>
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden
>>>> email]<http://user/SendEmail.jtp?type=node&node=3826499&i=1>
>>>> For additional commands, e-mail: [hidden
>>>> email]<http://user/SendEmail.jtp?type=node&node=3826499&i=2>
>>>>
>>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html
>>>  To unsubscribe from Arabic characters not appearing correctly from
>>> .properties file, click
>>> here<
>>>
>>>
>>
>>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Christian Huber
Am 20.09.2011 14:31, schrieb Martin Grigorov:

> On Tue, Sep 20, 2011 at 3:26 PM, Christian Huber<[hidden email]>  wrote:
>> Just a short addition, the resource bundle editor plugin for eclipse is
>> great for handling .properties files with UTF-8 characters. The files are
>> stored with ISO encoding and UTF-8 characters are escaped correctly while
>> you can use the unescaped in the editor.
> This is an option but not a good one. In my experience the developers
> support only the English version of the bundle and the people who
> translate to the other languages are not Eclipse (or any other IDE)
> users.
> The XML is the most convenient, I think.
In such situations you are right, an eclipse plugin is not suitable if
resources should be created by non-developers. But in my experience that
means such resources are created by members of the business departement
and most xml files that we receive from those have issues like binary
garbage in prolog (apart from BOM) or invalid use of xml entities etc.
In such a scenario I would recommend the use a proper CMS if possible.
But I guess that is another topic ;-)

>> The Sanity Resort<http://sanityresort.blogspot.com/>
>>
>> Am 20.09.2011 13:50, schrieb aabfattah:
>>> Well , the xml file didn't load and it loaded the default .properties
>>> files
>>> from wicket
>>> But the first trick worked :)
>>>
>>> On 20 September 2011 13:41, Martin A [via Apache Wicket]<
>>> [hidden email]>    wrote:
>>>
>>>> Hi, Ahmed,
>>>>
>>>> As the Java specification defines, the .properties file contains only
>>>> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot
>>>> enter
>>>>
>>>> arabic characters in a properties file.
>>>>
>>>> You have two options here:
>>>>
>>>>     1. Unicode escape your arabic characters, using converters, like this
>>>> one
>>>>     here>    http://www.rishida.net/tools/conversion/ (what works for you
>>>>     appears under JavaScript escapes) or
>>>>     2. Use an xml file for language properties.
>>>>
>>>> Regards,
>>>> Martin
>>>>
>>>> On Tue, Sep 20, 2011 at 1:53 PM, aabfattah<
>>>> [hidden email]<http://user/SendEmail.jtp?type=node&node=3826499&i=0>>
>>>> wrote:
>>>>
>>>>> Hello ,
>>>>> I have written many .properties pages to show error messages in Arabic
>>>> and
>>>>> saved them in UTF-8 format and they display like that :
>>>>> يجب ادخال اسم الدخول
>>>>> *Although I wrote all HTML in Arabic and it displays correctly
>>>>> *
>>>>> I am using Eclipse Helios and I set workspace encoding to UTF-8
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html
>>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden
>>>>> email]<http://user/SendEmail.jtp?type=node&node=3826499&i=1>
>>>>> For additional commands, e-mail: [hidden
>>>>> email]<http://user/SendEmail.jtp?type=node&node=3826499&i=2>
>>>>>
>>>>>
>>>> ------------------------------
>>>>   If you reply to this email, your message will be added to the discussion
>>>> below:
>>>>
>>>>
>>>> http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html
>>>>   To unsubscribe from Arabic characters not appearing correctly from
>>>> .properties file, click
>>>> here<
>>>>
>>>>
>>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Arabic characters not appearing correctly from .properties file

Andrea Del Bene-2
In reply to this post by Martijn Dashorst
I had experience with a site which should have been used by both Chinese
and English users. IMHO in this scenario the best solution is to have
the entire stack setted to utf-8,  which includes properties file (not
XML), web server and database (extra ISO chars can be written to db).
If you know a better approach or pattern please let me know.

> On Tue, Sep 20, 2011 at 1:41 PM, Martin A<[hidden email]>  wrote:
>> Hi, Ahmed,
>>
>> As the Java specification defines, the .properties file contains only
>> characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter
>> arabic characters in a properties file.
> Wrong: with Java 6 you can load properties files written in UTF-8 (or
> any encoding for that matter):
>
> http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771
>
> Martijn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]