You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Sangjin Lee (JIRA)" <ji...@apache.org> on 2007/12/12 20:12:43 UTC

[jira] Commented: (GERONIMO-3638) should allow URL encoding with custom encoding charset other than the default

    [ https://issues.apache.org/jira/browse/GERONIMO-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551083 ] 

Sangjin Lee commented on GERONIMO-3638:
---------------------------------------

OK, I think I understand what the right thing here is...  For URL encoding, now the new RFC is 3986 and it obsoletes 2396.  It states

<snippet>
   When a new URI scheme defines a component that represents textual
   data consisting of characters from the Universal Character Set [UCS],
   the data should first be encoded as octets according to the UTF-8
   character encoding [STD63]; then only those octets that do not
   correspond to characters in the unreserved set should be percent-
   encoded.  For example, the character A would be represented as "A",
   the character LATIN CAPITAL LETTER A WITH GRAVE would be represented
   as "%C3%80", and the character KATAKANA LETTER A would be represented
   as "%E3%82%A2".
</snippet>

The default URL encoding charset used to be ISO-8859-1, but now it is UTF-8.  The distinction becomes clear when you need to encode Unicode characters that do not exist in the ascii code page.

In any case, I think the right thing to happen here is:
- The default charset for URL encoding queries and forms shall be "ISO-8859-1"
- One should allow the charset to be overridden specifically with "UTF-8" in mind

Thoughts?



> should allow URL encoding with custom encoding charset other than the default
> -----------------------------------------------------------------------------
>
>                 Key: GERONIMO-3638
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3638
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>         Attachments: patch.zip
>
>
> Currently AsyncHttpClient uses Chartset.defaultCharset() when it encodes the query string.  However, applications may want to use a different encoding than the machine default charset; e.g. UTF-8.  It needs to provide a way to specify an encoding that AHC should use to encode the query string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.