AppFuse uses a spring filter to force UTF-8 character encoding.

<filter>
        <filter-name>encodingFilter</filter-name>
 
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter
-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>

http://www.springframework.org/docs/api/org/springframework/web/filter/Chara
cterEncodingFilter.html 

I'm not sure if this is will solve your problem, just something I ran across
when checking out appfuse this weekend. 


-----Original Message-----
From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 30, 2006 9:15 AM
To: MyFaces Discussion; Facelets Users' List
Subject: How can I set the character encoding to UTF-8?

I am using MyFaces and Facelets and trying to deliver XHTML with UTF-8 
encoding, but when outputting national characters they are converted to 
&#xyz; codes.

I have found out that the MyFaces ResponseWriter thinks I want 
ISO-8859-1 encoding because calling 
FacesContext.getResponseWriter().getCharacterEncoding() returns the 
ISO-8859-1 value.

All my Facelet view files are written in UTF-8 and they all state that 
they are UTF-8 as follows
<?xml version="1.0" encoding="UTF-8"?>

Can anyone give me a hint why MyFaces still thinks I am serving ISO-8859-1 ?

I am using the default render kit (if that matters), my facelet views 
are written as .xml files in which I do NOT have an f:view tag which the 
Facelet developer's claim is not necessary when using Facelets.

Randahl


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to