You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by abaijal <ab...@gmail.com> on 2007/11/27 18:47:49 UTC
Issue with Internationalization of Non ascii characters
Hi All
I am new to wicket framework and am trying to implement internationalization
for Russian Characters.
When displaying Russian characters on screen, Wicket rendering displays
garbage values
I am using Wicket 1.2.6 and Weblogic 8.1 SP3
Things I have already tried :
1)HTML pages have charset as UTF- 8 as part of the META tag. <meta
http-equiv="Content-Type" content="text/html; charset=UTF-8">
2) The Property files and HTML files have been encoded as UTF-8 files so as
to save any non-ascii characters.
3 ) Checked settings of Browsers. All External internet links with non-ascii
characters work properly in browser. Tried both on IE6 and on Firefox 2.0
My Observations :
1) While trying to display non ascii characters , garbage value appears on
the screen. Apart from pulling data from property file I have also hard
coded non-ascii characters in HTML file. Even hardcoded characters do not
get displayed properly on web browser.
2) The HTML files are present in WEB-INF/classes/.. folders. If I place the
same HTML file outside the WEB-INF folder and put a direct link to the
html file, russian characters appear correctly on the screen.
3 ) Using the method getLocale().getLanguage() I tried to display "Russian"
in non-ascii character. This phrase appeared correctly on browser screen.
It seems that when Wicket tries to render the Web-page the non-ascii
characters are getting distorted.
--
View this message in context: http://www.nabble.com/Issue-with-Internationalization-of-Non-ascii-characters-tf4883325.html#a13975999
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Issue with Internationalization of Non ascii characters
Posted by Vit Rozkovec <wi...@rozkovec.info>.
If you're on Linux,
I have made a little script for conversion, which finds all .properties
files in current directory and subdirectories and encode them proper way:
#!/bin/sh
for file in $(find . -name *.properties); do
native2ascii $file $file
echo $file
done
You can find native2ascii also for other platforms
vitek
Frank Bille wrote:
> I have the same problem even though only 3 characters (Danish: æ, ø, å), but
> I use http://www.resourcebundleeditor.com for eclipse, which creates
> .properties files without me having to worry about non-ascii, linebreaks
> etc. Nice little tool.
>
> Frank
>
>
> On Nov 27, 2007 8:52 PM, abaijal <ab...@gmail.com> wrote:
>
>
>> Thanks for the help.
>> From the example I see that I need to convert the text into Unicode
>> characters.
>>
>>
>> Eelco Hillenius wrote:
>>
>>>> I am new to wicket framework and am trying to implement
>>>> internationalization
>>>> for Russian Characters.
>>>>
>>>> When displaying Russian characters on screen, Wicket rendering displays
>>>> garbage values
>>>>
>>> Check out http://wicketstuff.org/wicket13/forminput/. You can select
>>> Russian from the drop down and that looks fine to me. I think that
>>> should work for 1.2 as well, though one of the improvements of 1.3 is
>>> that you can use XML (UTF-8) encoded properties files (even if you're
>>> using Java 1.4).
>>>
>>> Eelco
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Issue-with-Internationalization-of-Non-ascii-characters-tf4883325.html#a13978245
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Issue with Internationalization of Non ascii characters
Posted by Frank Bille <fr...@apache.org>.
I have the same problem even though only 3 characters (Danish: æ, ø, å), but
I use http://www.resourcebundleeditor.com for eclipse, which creates
.properties files without me having to worry about non-ascii, linebreaks
etc. Nice little tool.
Frank
On Nov 27, 2007 8:52 PM, abaijal <ab...@gmail.com> wrote:
>
> Thanks for the help.
> From the example I see that I need to convert the text into Unicode
> characters.
>
>
> Eelco Hillenius wrote:
> >
> >> I am new to wicket framework and am trying to implement
> >> internationalization
> >> for Russian Characters.
> >>
> >> When displaying Russian characters on screen, Wicket rendering displays
> >> garbage values
> >
> > Check out http://wicketstuff.org/wicket13/forminput/. You can select
> > Russian from the drop down and that looks fine to me. I think that
> > should work for 1.2 as well, though one of the improvements of 1.3 is
> > that you can use XML (UTF-8) encoded properties files (even if you're
> > using Java 1.4).
> >
> > Eelco
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Issue-with-Internationalization-of-Non-ascii-characters-tf4883325.html#a13978245
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Issue with Internationalization of Non ascii characters
Posted by Eelco Hillenius <ee...@gmail.com>.
> Thanks for the help.
> From the example I see that I need to convert the text into Unicode
> characters.
If you want to use another charset you can do that as well, both in
your pages and in the properties XML file (at least, that's what I
think). Don't forget to *edit* it in the proper format as well though.
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Issue with Internationalization of Non ascii characters
Posted by abaijal <ab...@gmail.com>.
Thanks for the help.
>From the example I see that I need to convert the text into Unicode
characters.
Eelco Hillenius wrote:
>
>> I am new to wicket framework and am trying to implement
>> internationalization
>> for Russian Characters.
>>
>> When displaying Russian characters on screen, Wicket rendering displays
>> garbage values
>
> Check out http://wicketstuff.org/wicket13/forminput/. You can select
> Russian from the drop down and that looks fine to me. I think that
> should work for 1.2 as well, though one of the improvements of 1.3 is
> that you can use XML (UTF-8) encoded properties files (even if you're
> using Java 1.4).
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Issue-with-Internationalization-of-Non-ascii-characters-tf4883325.html#a13978245
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Issue with Internationalization of Non ascii characters
Posted by Eelco Hillenius <ee...@gmail.com>.
> I am new to wicket framework and am trying to implement internationalization
> for Russian Characters.
>
> When displaying Russian characters on screen, Wicket rendering displays
> garbage values
Check out http://wicketstuff.org/wicket13/forminput/. You can select
Russian from the drop down and that looks fine to me. I think that
should work for 1.2 as well, though one of the improvements of 1.3 is
that you can use XML (UTF-8) encoded properties files (even if you're
using Java 1.4).
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Issue with Internationalization of Non ascii characters
Posted by Suad AlShamsi <su...@gmail.com>.
I faced the same problem with Arabic character. I used native2ascii.exe
to encode the property files and I used encoding="utf-8" in my html
pages and then it worked.
Regards,
Suad
abaijal wrote:
> Hi All
>
> I am new to wicket framework and am trying to implement internationalization
> for Russian Characters.
>
> When displaying Russian characters on screen, Wicket rendering displays
> garbage values
>
> I am using Wicket 1.2.6 and Weblogic 8.1 SP3
>
> Things I have already tried :
> 1)HTML pages have charset as UTF- 8 as part of the META tag. <meta
> http-equiv="Content-Type" content="text/html; charset=UTF-8">
> 2) The Property files and HTML files have been encoded as UTF-8 files so as
> to save any non-ascii characters.
> 3 ) Checked settings of Browsers. All External internet links with non-ascii
> characters work properly in browser. Tried both on IE6 and on Firefox 2.0
>
> My Observations :
> 1) While trying to display non ascii characters , garbage value appears on
> the screen. Apart from pulling data from property file I have also hard
> coded non-ascii characters in HTML file. Even hardcoded characters do not
> get displayed properly on web browser.
> 2) The HTML files are present in WEB-INF/classes/.. folders. If I place the
> same HTML file outside the WEB-INF folder and put a direct link to the
> html file, russian characters appear correctly on the screen.
> 3 ) Using the method getLocale().getLanguage() I tried to display "Russian"
> in non-ascii character. This phrase appeared correctly on browser screen.
>
> It seems that when Wicket tries to render the Web-page the non-ascii
> characters are getting distorted.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org