You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Pahne <ap...@net22.de> on 2007/12/12 10:46:49 UTC

problem displaying german umlaute

Hello,

I have a problem with a german web application which doesn't show german 
umlaute like ä ö ü correctly.

When those special chars appear in a template, everythings works fine. 
But when I have a method in a page class like

   public String getHeader(){
       return "Übernachtungen";
   }

then it won't show correctly.


I don't think that this is a tapestry problem (or a bug), but I hope 
that anybody on this list knows how to fix it.

Here are some Details

Tapestry 4.1.3
Java 1.6
Windows XP Host
Tomcat 5.x


from my *.application:
   <meta key="org.apache.tapestry.template-encoding" value="UTF-8"/>

I am developing with Eclipse and double checked that all the files arte 
encoded in UTF-8.


Can anybody help or point me to the right direction?

Thanks,
Andy






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


Re: problem displaying german umlaute

Posted by Salamon Zsolt <sa...@gmail.com>.
I think you should use the tapestry localization capabilities.

If you create or not a properties file, you should use unicode  
escapes characters in place of normal german characters.

example:
Übernachtungen=\u00dcbernachtungen

Every not english character have an equivalent unicode escape character.
ä=00e4
ö=00f6
ü=00fc

On Dec 12, 2007, at 10:46, Andy Pahne wrote:

> Hello,
>
> I have a problem with a german web application which doesn't show  
> german umlaute like ä ö ü correctly.
>
> When those special chars appear in a template, everythings works  
> fine. But when I have a method in a page class like
>
>   public String getHeader(){
>       return "Übernachtungen";
>   }
>
> then it won't show correctly.
>
>
> I don't think that this is a tapestry problem (or a bug), but I  
> hope that anybody on this list knows how to fix it.
>
> Here are some Details
>
> Tapestry 4.1.3
> Java 1.6
> Windows XP Host
> Tomcat 5.x
>
>
> from my *.application:
>   <meta key="org.apache.tapestry.template-encoding" value="UTF-8"/>
>
> I am developing with Eclipse and double checked that all the files  
> arte encoded in UTF-8.
>
>
> Can anybody help or point me to the right direction?
>
> Thanks,
> Andy
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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


Re: problem displaying german umlaute

Posted by Daniel Kleine-Albers <dk...@dka-edv.net>.
Hi there,

I had a similar problem. It looks like it is not possible to write the  
umlauts correctly in java code itself. If you use a properties file  
instead (which you obviously already configured) the strings read from  
there will work fine.

In your code try something like

return getMessages().getMessage("yourMessageName");

instead of hardcoding the translation into the code.


Hope it helps
Daniel


On Dec 16, 2007, at 2:31 AM, Matt Brock wrote:

>
>
> Andy Pahne-3 wrote:
>>
>> I have a problem with a german web application which doesn't show  
>> german
>> umlaute like ä ö ü correctly.
> You could try using the HTML entity instead.  Not the ideal  
> solution, I
> know...
>
> &Uuml; -> &amp;Uuml;
>
> &uuml; -> &amp;uuml;
>
> http://www.utexas.edu/learn/html/spchar.html More here .
>
> -- 
> View this message in context: http://www.nabble.com/problem-displaying-german-umlaute-tp14291940p14357234.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: problem displaying german umlaute

Posted by Matt Brock <br...@gmail.com>.

Andy Pahne-3 wrote:
> 
> I have a problem with a german web application which doesn't show german 
> umlaute like ä ö ü correctly.
You could try using the HTML entity instead.  Not the ideal solution, I
know...

&Uuml; -> &amp;Uuml;

&uuml; -> &amp;uuml;

http://www.utexas.edu/learn/html/spchar.html More here .

-- 
View this message in context: http://www.nabble.com/problem-displaying-german-umlaute-tp14291940p14357234.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: problem displaying german umlaute

Posted by Andy Pahne <ap...@net22.de>.
I already added -Dfile.encoding=utf-8 to the tomcat options.
I am currently trying the solution that Salamon posted, I'll let you 
know if that works...

Andy


Lukas Ruetz schrieb:
> Hi,
> 
> If all your property-files are encoded in UTF-8 then it's maybe your
> servlet-container - in case of tomcat try to start it with the
> option "-Dfile.encoding=utf-8". I'm using T4.0 but I think there's
> no difference in 4.1
> 
> hth,
> lukas
> 
> Am Mittwoch, 12. Dezember 2007 10:46 schrieb Andy Pahne:
>> Hello,
>>
>> I have a problem with a german web application which doesn't show german
>> umlaute like ä ö ü correctly.
>>
>> When those special chars appear in a template, everythings works fine.
>> But when I have a method in a page class like
>>
>>    public String getHeader(){
>>        return "Übernachtungen";
>>    }
>>
>> then it won't show correctly.
>>
>>
>> I don't think that this is a tapestry problem (or a bug), but I hope
>> that anybody on this list knows how to fix it.
>>
>> Here are some Details
>>
>> Tapestry 4.1.3
>> Java 1.6
>> Windows XP Host
>> Tomcat 5.x
>>
>> >from my *.application:
>>
>>    <meta key="org.apache.tapestry.template-encoding" value="UTF-8"/>
>>
>> I am developing with Eclipse and double checked that all the files arte
>> encoded in UTF-8.
>>
>>
>> Can anybody help or point me to the right direction?
>>
>> Thanks,
>> Andy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


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


Re: problem displaying german umlaute

Posted by Lukas Ruetz <lu...@gmx.at>.
Hi,

If all your property-files are encoded in UTF-8 then it's maybe your
servlet-container - in case of tomcat try to start it with the
option "-Dfile.encoding=utf-8". I'm using T4.0 but I think there's
no difference in 4.1

hth,
lukas

Am Mittwoch, 12. Dezember 2007 10:46 schrieb Andy Pahne:
> Hello,
>
> I have a problem with a german web application which doesn't show german
> umlaute like ä ö ü correctly.
>
> When those special chars appear in a template, everythings works fine.
> But when I have a method in a page class like
>
>    public String getHeader(){
>        return "Übernachtungen";
>    }
>
> then it won't show correctly.
>
>
> I don't think that this is a tapestry problem (or a bug), but I hope
> that anybody on this list knows how to fix it.
>
> Here are some Details
>
> Tapestry 4.1.3
> Java 1.6
> Windows XP Host
> Tomcat 5.x
>
> >from my *.application:
>
>    <meta key="org.apache.tapestry.template-encoding" value="UTF-8"/>
>
> I am developing with Eclipse and double checked that all the files arte
> encoded in UTF-8.
>
>
> Can anybody help or point me to the right direction?
>
> Thanks,
> Andy

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