struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Evans (JIRA)" <>
Subject [jira] Reopened: (STR-1140) bean:message tag not writing correctly from application properties file encoded in utf-8
Date Tue, 02 May 2006 00:34:18 GMT
     [ ]
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:
>      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 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 to iso-8859-1, all characters 
> are displayed correctly. It seems that the tag is treating the 
> 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
> ( "", request.getLocale() );
>   out.print(new String( oResource.getString( aKey ).getBytes
> ("ISO8859_1"), "UTF8"));
> This will write correctly from an utf-8 encoded 
> 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 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:
For more information on JIRA, see:

View raw message