You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kalle Korhonen (JIRA)" <my...@incubator.apache.org> on 2005/05/04 22:21:04 UTC

[jira] Updated: (MYFACES-230) Support UTF-8 encoded property files, allow caching of properties

     [ http://issues.apache.org/jira/browse/MYFACES-230?page=all ]

Kalle Korhonen updated MYFACES-230:
-----------------------------------

    Attachment: myfaces-utf8resourcebundle.patch

This patch was made on 2005-05-03 just before the move to SVN. I'm having problems with connecting to SVN repository from my Linux dev machine, so sorry can't currently create a patch with against the absolute latest codebase. There are two issues to consider with this patch:
1) _MessageUtils.java classes in javax.faces.component, javax.faces.validator and javax.faces.convert use ResourceBundle as well. Since currently the classes in those packages are not allowed to use classes in other src roots (I guess for compliance with JSF spec), those classes couldn't currently handle UTF-8 encoded properties.
2) I'm going by memory now, but I believe Stan S. created a bug about LoadBundleTag not passing in webapp/thread classloader when loading a resourcebundle, which would cause issues when libs are shared. This was one of the classes I changed as well.

There might be a somewhat better way to do this so we wouldn't need to change all references to ResourceBundle but so far I couldn't think of anything. I'd appreciate if someone could take a look at the patch.

> Support UTF-8 encoded property files, allow caching of properties
> -----------------------------------------------------------------
>
>          Key: MYFACES-230
>          URL: http://issues.apache.org/jira/browse/MYFACES-230
>      Project: MyFaces
>         Type: Improvement
>     Versions: Nightly Build
>     Reporter: Kalle Korhonen
>     Priority: Minor
>  Attachments: myfaces-utf8resourcebundle.patch
>
> Struts supports UTF-8 encoded property files and caching of property values with its PropertyMessageResources class. MyFaces uses standard Java ResourceBundle and its PropertyResourceBundle, which only allows Latin-1 encoded property files. Adding a ResourceBundle wrapper that allows UTF-8 encoded property files doesn't break anything since all UTF-8 encoded single byte characters are in the same positions as in Latin-1 encoding. I'll add a patch to this bug that contains a ResourceBundle wrapper and necessary changes to take it into use. 

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