struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Evans (JIRA)" <j...@apache.org>
Subject [jira] Closed: (STR-1140) bean:message tag not writing correctly from application properties file encoded in utf-8
Date Tue, 02 May 2006 00:34:19 GMT
     [ http://issues.apache.org/struts/browse/STR-1140?page=all ]
     
David Evans closed STR-1140:
----------------------------

    Resolution: Not A Problem
     Assign To: Martin Cooper

> bean:message tag not writing correctly from application properties file encoded in utf-8
> ----------------------------------------------------------------------------------------
>
>          Key: STR-1140
>          URL: http://issues.apache.org/struts/browse/STR-1140
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Taglibs
>     Versions: 1.0.2
>  Environment: Operating System: All
> Platform: PC
>     Reporter: Deedee Zhang
>     Assignee: Martin Cooper
>     Priority: Minor

>
> We have created application_fr_CA.properties encoded in utf-8 and use the 
> bean:message tag to retrieve the messages from this file. The JSP directive 
> charset is set to utf-8 so is HTML charset. In IE6 on W2K the encoding in view 
> manu is auto-selected and the setting is utf-8. This means that the browser is 
> treating the incoming stream as utf-8 encoding. However, some characters 
> retreived by the bean:message tag are not displayed correctly. When we change 
> the encoding of the application_fr_CA.properties to iso-8859-1, all characters 
> are displayed correctly. It seems that the tag is treating the 
> application_fr_CA.properties as iso-8859-1 encoded even though it is utf-8 
> encoded. We did the following conversion in the JSP with JDK ResourceBundle 
> class:
>   ResourceBundle oResource = ResourceBundle.getBundle
> ( "application.properties", request.getLocale() );
>   out.print(new String( oResource.getString( aKey ).getBytes
> ("ISO8859_1"), "UTF8"));
> This will write correctly from an utf-8 encoded application_fr_CA.properties 
> file.
> We have the same problem with Jakarta Commons Validator in that the messages in 
> the Javascript pop-up window are not displayed correctly when they are 
> retrieved from application_fr_CA.properties file which is utf-8 encoded.
> I think the bean:message tag can be enhanced so it will retrieve messages 
> correctly from an utf-8 encoded property file.
> Thank you very much.
> Sincerely,
> Deedee Zhang

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message