You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nino martinez wael <ni...@gmail.com> on 2011/11/02 09:54:21 UTC

UTF-8 encoding RFE for warning?

Hi

I've UTF-8 encoded all my files, setup tomcat to support utf-8 and
everything.. But something did'nt work because my chars where all garble..

Then I tried all sorts of stuff, only to discover that nothing worked.
Finally I figured out that I was using .property files and not
.property.xml , apparently java does not support utf-8 in .property files.

A warning on having utf-8 content in .property files would be nice.. Or is
it just general knowledge?

regards Nino

Re: UTF-8 encoding RFE for warning?

Posted by Attila Király <ki...@gmail.com>.
Nitpicking a bit: .properties files need to be in ISO 8859-1 encoding not
in default.

Attila

2011/11/2 Wilhelmsen Tor Iver <To...@arrive.no>

> > It's a known fact for me aswell now :)
>
> Note that even though properties files need to be in the "default"
> encoding, you can use non-iso-latin characters by way of the \uxxxx syntax,
> though a bit more cumbersome than "raw" Unicode characters.
>
> - Tor Iver
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

RE: UTF-8 encoding RFE for warning?

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> It's a known fact for me aswell now :)

Note that even though properties files need to be in the "default" encoding, you can use non-iso-latin characters by way of the \uxxxx syntax, though a bit more cumbersome than "raw" Unicode characters.

- Tor Iver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: UTF-8 encoding RFE for warning?

Posted by nino martinez wael <ni...@gmail.com>.
It's a known fact for me aswell now :)

Ok it might be a no go then i guess. Might be the reason why eclipse also
has the "encoding determined from content" they actually have to read all
the content to *guess* what encoding it is.

regards Nino

2011/11/2 Martin Grigorov <mg...@apache.org>

> On Wed, Nov 2, 2011 at 10:54 AM, nino martinez wael
> <ni...@gmail.com> wrote:
> > Hi
> >
> > I've UTF-8 encoded all my files, setup tomcat to support utf-8 and
> > everything.. But something did'nt work because my chars where all
> garble..
> >
> > Then I tried all sorts of stuff, only to discover that nothing worked.
> > Finally I figured out that I was using .property files and not
> > .property.xml , apparently java does not support utf-8 in .property
> files.
> >
> > A warning on having utf-8 content in .property files would be nice.. Or
> is
> > it just general knowledge?
>
> For me this is a well known fact but many people still hit this problem,
> I'd love to see a Java program that accepts file as input and returns
> what encoding is used. There are some tricks with checking the first
> few bytes but I've never seen something stable that works for all
> possible encodings.
>
> >
> > regards Nino
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: UTF-8 encoding RFE for warning?

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Nov 2, 2011 at 10:54 AM, nino martinez wael
<ni...@gmail.com> wrote:
> Hi
>
> I've UTF-8 encoded all my files, setup tomcat to support utf-8 and
> everything.. But something did'nt work because my chars where all garble..
>
> Then I tried all sorts of stuff, only to discover that nothing worked.
> Finally I figured out that I was using .property files and not
> .property.xml , apparently java does not support utf-8 in .property files.
>
> A warning on having utf-8 content in .property files would be nice.. Or is
> it just general knowledge?

For me this is a well known fact but many people still hit this problem,
I'd love to see a Java program that accepts file as input and returns
what encoding is used. There are some tricks with checking the first
few bytes but I've never seen something stable that works for all
possible encodings.

>
> regards Nino
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org