You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/05/02 02:34:18 UTC

[jira] Reopened: (STR-1140) bean:message tag not writing correctly from application properties file encoded in utf-8

     [ http://issues.apache.org/struts/browse/STR-1140?page=all ]
     
David Evans reopened STR-1140:
------------------------------

    Assign To:     (was: Struts Developer Mailing List)

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