Issue Details (XML | Word | Printable)

Key: EQX-80
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Jiyun Kang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse Light

Foreign language encoding issues

Created: 20/Mar/06 09:34 PM   Updated: 20/Oct/06 01:32 AM   Resolved: 20/Oct/06 01:32 AM
Component/s: None
Affects Version/s: 1.6
Fix Version/s: 1.7

File Attachments: 1. Microsoft PowerPoint encoding_issues.ppt (807 kB)

Environment:
OS: Windows XP pro - Korean
Software platform: JDK 1.4.2_10, Tomcat 5.0.28, Maven2.1, ANT1.6.2, Eclipse3.1
Hardware specifications : Intel P4 3.0, 1G Ram


 Description  « Hide
There were several language encoding problem in most of equinox and appfuse projects.

I coudn't find any other nice ways to orgnize these problems, thus I pack them all in a power point file.

Matt Raible added a comment - 20/Mar/06 09:45 PM
I believe the AppFuse issues are fixed by APF-250 (moving the localeFilter's mapping after the encodingFilter's mapping). The Equinox issues you pointed out might be fixable by including Spring's CharacterEncodingFilter in your web.xml.

Jiyun Kang added a comment - 21/Mar/06 01:45 AM
Well, I've also tested those issues in current version demo site, and it gave me the same errors.

Is that becuase you simply didn't concern about those issues in demos?

What I've tested in Appfuse-jsf demo was not the encoding problem.

The error occurs in the following situation; "Edit Profile" once and save it, and then click the "Edit Profile" again. It gives the error page.

In case of equinox, I put following lines to web.xml. However, it didn't work.

<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>
 ...

    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>

I using MYSQL for Database and its default character set is UTF-8.

Matt Raible added a comment - 21/Mar/06 09:44 AM
Correct, the demo site hasn't been updated to match the code in CVS. So most of your bugs are valid - but I don't know when I'll have time to fix them. If you figure out solutions, please let me know.

Jiyun Kang added a comment - 27/Mar/06 03:18 AM
For the JSF encoding problem, I found an answer.

In faces-config.xml, set the <default-locale> element of the <locale-config> according to your needs.

For example, I set the value as "ko".

<faces-config>
    <!-- Spring VariableResolver for JSF -->
    <application>
        <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
        <locale-config>
            <default-locale>ko</default-locale>
            <supported-locale>en</supported-locale>
            <supported-locale>es</supported-locale>
        </locale-config>
        <message-bundle>messages</message-bundle>
    </application>

For the displaytag's export Unicode-encoding problem, I am still struggling to find an answer.

Anyone who knows how to export foreign language using displaytag, please give me an answer.

And one more, Is JSF having a hard dependency of JWSDP or jsr173? cuz I get a maven error message when I try to deploy equinox-jsf 1.6.

I guess that I've made quite many useless threads in this sites. I apologize my poor English and poor knowledge. And I thank everyone who helped and guided me to a right way.

I wish that I can be one of those who are able to help these problems in one day.

Matt Raible made changes - 18/Apr/06 07:54 AM
Field Original Value New Value
Affects Version/s 1.6 [ 10030 ]
Fix Version/s 1.7 [ 10040 ]
osman izbat added a comment - 25/Apr/06 04:38 AM
There was same problem in my equinox applcation

I've placed encodingFilter mappings on top of all filter mappings in web.xml and its solved

http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String)

Regards.

Matt Raible added a comment - 20/Oct/06 01:32 AM
Added Spring's CharacterEncodingFilter to solve foreign-language issues. Also added UTF-8 encoding indicators to JSPs.

Matt Raible made changes - 20/Oct/06 01:32 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]