You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/08/24 02:45:16 UTC
[jira] Created: (CONNECTORS-94) fix common localization traps
fix common localization traps
-----------------------------
Key: CONNECTORS-94
URL: https://issues.apache.org/jira/browse/CONNECTORS-94
Project: Apache Connectors Framework
Issue Type: Task
Reporter: Robert Muir
Searching thru the LCF code, i found several uses of the following that appear to be potentially dangerous:
* getBytes() with no encoding: this is dangerous as the encoding is completely unspecified. In most places this should likely mean "UTF-8"
* getBytes("utf-8"): this is mostly a nitpick, but this alias is not guaranteed to exist (see Charset docs). I suggest changing these all to "UTF-8"
* String.toLowerCase()/String.toUpperCase() with no specified Locale, where it appears the text is not used solely for display, but instead for 'caseless matching'. I suggest changing these to use either the root Locale: new Locale("") or even easier, Locale.ENGLISH. This way ACF does not have surprising behavior on say a Turkish computer.
I can contribute a patch to address these.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CONNECTORS-94) fix common localization traps
Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CONNECTORS-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901699#action_12901699 ]
Karl Wright commented on CONNECTORS-94:
---------------------------------------
Please contribute. I'd like to review the places where you find these issues, especially getBytes() and toLowerCase()/toUpperCase(), because I thought we'd been quite careful about those.
> fix common localization traps
> -----------------------------
>
> Key: CONNECTORS-94
> URL: https://issues.apache.org/jira/browse/CONNECTORS-94
> Project: Apache Connectors Framework
> Issue Type: Task
> Reporter: Robert Muir
>
> Searching thru the LCF code, i found several uses of the following that appear to be potentially dangerous:
> * getBytes() with no encoding: this is dangerous as the encoding is completely unspecified. In most places this should likely mean "UTF-8"
> * getBytes("utf-8"): this is mostly a nitpick, but this alias is not guaranteed to exist (see Charset docs). I suggest changing these all to "UTF-8"
>
> * String.toLowerCase()/String.toUpperCase() with no specified Locale, where it appears the text is not used solely for display, but instead for 'caseless matching'. I suggest changing these to use either the root Locale: new Locale("") or even easier, Locale.ENGLISH. This way ACF does not have surprising behavior on say a Turkish computer.
> I can contribute a patch to address these.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.