You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Navid Vahdat <na...@vahdat.de> on 2005/10/31 11:27:51 UTC
Encoding German Umlauts
Hi Guys!
When I type a German umlaut like ß in an input field, it seems to be
misencoded/decoded to a two-character expression. My default locale is
English, and the pages encoding seems to be utf-8, though I didn't set
that explicitly.
What do I need to do, to get my umlauts correctly?
Cheers,
Navid
Re: Encoding German Umlauts
Posted by Werner Punz <we...@gmx.at>.
There are some issues with different browsers, to my knowledge the IE
does some nasty things regarding ISO and UTF, as far as I know it does
not encode Euro correctly for instance pushing it in ISO to an incorrect
position...
Werner
Navid Vahdat wrote:
> Thanks Rick! Using your header worked :-)
>
> In my understanding UTF-8 is a super set of iso-8859-1. Would you by any
> chance know, why it doesn't like my umlauts?
>
>
> Rick Gruber-Riemer wrote:
>
>>Hi
>>
>>I use the following in the header of all my JSP's (just replace
>>iso-8859-1 with utf-8)
>><%@ page
>> language="java"
>> errorPage="/errors/errorpage.jsp"
>> contentType="text/html;charset=iso-8859-1"
>> pageEncoding="iso-8859-1"
>>%>
>>And I make sure that (a) my editor actually uses the specified encoding,
>>and (b) that my resource bundles are correctly translated.
>>
>>Also make sure that if you are using includes with Tomcat, then even if
>>using UTF-8 Tomcat assumes 8859-1 (at least the last time I tried that).
>>
>>Navid Vahdat wrote:
>>
>>
>>>Hi Guys!
>>>
>>>When I type a German umlaut like ß in an input field, it seems to be
>>>misencoded/decoded to a two-character expression. My default locale is
>>>English, and the pages encoding seems to be utf-8, though I didn't set
>>>that explicitly.
>>>
>>>What do I need to do, to get my umlauts correctly?
>>>
>>>
>>>Cheers,
>>>Navid
>
>
>
>
Re: Encoding German Umlauts
Posted by Mathias Brökelmann <mb...@googlemail.com>.
the browsers don´t send which encoding is used if a form with input
fields is submitted. Tomcat uses the default encoding (ISO-8859-1) to
decode the values which breaks them if they are encoded with utf-8.
take a look into this thread for a solution:
http://marc.theaimsgroup.com/?l=myfaces-dev&m=112564780928659&w=2
2005/10/31, Martin Marinschek <ma...@gmail.com>:
> No, UTF-8 is not a superset of ISO-8859-1.
>
> It is true that you can encode many more characters with UTF-8 than
> with ISO-8859-1, but the way the encoding is done is very different.
>
> With UTF-8, you get two bytes for the umlauts, as UTF-8 encodes only
> the standard characters in the first byte (the name UTF-8 is actually
> a bit misleading).
>
> With ISO-8859-1, all western european characters are encoded in one byte.
>
> regards,
>
> Martin
>
> On 10/31/05, Navid Vahdat <na...@vahdat.de> wrote:
> > Thanks Rick! Using your header worked :-)
> >
> > In my understanding UTF-8 is a super set of iso-8859-1. Would you by any
> > chance know, why it doesn't like my umlauts?
> >
> >
> > Rick Gruber-Riemer wrote:
> > > Hi
> > >
> > > I use the following in the header of all my JSP's (just replace
> > > iso-8859-1 with utf-8)
> > > <%@ page
> > > language="java"
> > > errorPage="/errors/errorpage.jsp"
> > > contentType="text/html;charset=iso-8859-1"
> > > pageEncoding="iso-8859-1"
> > > %>
> > > And I make sure that (a) my editor actually uses the specified encoding,
> > > and (b) that my resource bundles are correctly translated.
> > >
> > > Also make sure that if you are using includes with Tomcat, then even if
> > > using UTF-8 Tomcat assumes 8859-1 (at least the last time I tried that).
> > >
> > > Navid Vahdat wrote:
> > >
> > >> Hi Guys!
> > >>
> > >> When I type a German umlaut like ß in an input field, it seems to be
> > >> misencoded/decoded to a two-character expression. My default locale is
> > >> English, and the pages encoding seems to be utf-8, though I didn't set
> > >> that explicitly.
> > >>
> > >> What do I need to do, to get my umlauts correctly?
> > >>
> > >>
> > >> Cheers,
> > >> Navid
> >
> >
> >
>
>
> --
>
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
>
--
Mathias
Re: Encoding German Umlauts
Posted by Martin Marinschek <ma...@gmail.com>.
No, UTF-8 is not a superset of ISO-8859-1.
It is true that you can encode many more characters with UTF-8 than
with ISO-8859-1, but the way the encoding is done is very different.
With UTF-8, you get two bytes for the umlauts, as UTF-8 encodes only
the standard characters in the first byte (the name UTF-8 is actually
a bit misleading).
With ISO-8859-1, all western european characters are encoded in one byte.
regards,
Martin
On 10/31/05, Navid Vahdat <na...@vahdat.de> wrote:
> Thanks Rick! Using your header worked :-)
>
> In my understanding UTF-8 is a super set of iso-8859-1. Would you by any
> chance know, why it doesn't like my umlauts?
>
>
> Rick Gruber-Riemer wrote:
> > Hi
> >
> > I use the following in the header of all my JSP's (just replace
> > iso-8859-1 with utf-8)
> > <%@ page
> > language="java"
> > errorPage="/errors/errorpage.jsp"
> > contentType="text/html;charset=iso-8859-1"
> > pageEncoding="iso-8859-1"
> > %>
> > And I make sure that (a) my editor actually uses the specified encoding,
> > and (b) that my resource bundles are correctly translated.
> >
> > Also make sure that if you are using includes with Tomcat, then even if
> > using UTF-8 Tomcat assumes 8859-1 (at least the last time I tried that).
> >
> > Navid Vahdat wrote:
> >
> >> Hi Guys!
> >>
> >> When I type a German umlaut like ß in an input field, it seems to be
> >> misencoded/decoded to a two-character expression. My default locale is
> >> English, and the pages encoding seems to be utf-8, though I didn't set
> >> that explicitly.
> >>
> >> What do I need to do, to get my umlauts correctly?
> >>
> >>
> >> Cheers,
> >> Navid
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German
Re: Encoding German Umlauts
Posted by Navid Vahdat <na...@vahdat.de>.
Thanks Rick! Using your header worked :-)
In my understanding UTF-8 is a super set of iso-8859-1. Would you by any
chance know, why it doesn't like my umlauts?
Rick Gruber-Riemer wrote:
> Hi
>
> I use the following in the header of all my JSP's (just replace
> iso-8859-1 with utf-8)
> <%@ page
> language="java"
> errorPage="/errors/errorpage.jsp"
> contentType="text/html;charset=iso-8859-1"
> pageEncoding="iso-8859-1"
> %>
> And I make sure that (a) my editor actually uses the specified encoding,
> and (b) that my resource bundles are correctly translated.
>
> Also make sure that if you are using includes with Tomcat, then even if
> using UTF-8 Tomcat assumes 8859-1 (at least the last time I tried that).
>
> Navid Vahdat wrote:
>
>> Hi Guys!
>>
>> When I type a German umlaut like ß in an input field, it seems to be
>> misencoded/decoded to a two-character expression. My default locale is
>> English, and the pages encoding seems to be utf-8, though I didn't set
>> that explicitly.
>>
>> What do I need to do, to get my umlauts correctly?
>>
>>
>> Cheers,
>> Navid
Re: Encoding German Umlauts
Posted by Rick Gruber-Riemer <ri...@vanosten.net>.
Hi
I use the following in the header of all my JSP's (just replace
iso-8859-1 with utf-8)
<%@ page
language="java"
errorPage="/errors/errorpage.jsp"
contentType="text/html;charset=iso-8859-1"
pageEncoding="iso-8859-1"
%>
And I make sure that (a) my editor actually uses the specified encoding,
and (b) that my resource bundles are correctly translated.
Also make sure that if you are using includes with Tomcat, then even if
using UTF-8 Tomcat assumes 8859-1 (at least the last time I tried that).
Navid Vahdat wrote:
> Hi Guys!
>
> When I type a German umlaut like ß in an input field, it seems to be
> misencoded/decoded to a two-character expression. My default locale is
> English, and the pages encoding seems to be utf-8, though I didn't set
> that explicitly.
>
> What do I need to do, to get my umlauts correctly?
>
>
> Cheers,
> Navid
>
>
>