[ 
http://issues.apache.org/jira/browse/HARMONY-156?page=comments#action_12368656 
] 

Paulex Yang commented on HARMONY-156:
-------------------------------------

All the spec about Charset historical name is:
" Some charsets have an historical name that is defined for compatibility with 
previous versions of the Java platform. A charset's historical name is either 
its canonical name or one of its aliases."

>From this paragraph, I personally think the historical name is specific to RI 
>without any public standard:(,  so the only way to be compatible with RI is 
>write testcases to get all historical names of RI supported Charsets, and 
>store them in an map.

I can provide the patch of tests(to get all historical name) and the mapping 
implementation, but before that, I hope I can get some better idea from the 
mailing list to avoid this ugly solution:-\.

> InputStreamReader.getEncoding() and OutputStreamWriter.getEncoding() should 
> return a historical charset name.
> -------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-156
>          URL: http://issues.apache.org/jira/browse/HARMONY-156
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Priority: Minor

>
> InputStreamReader.getEncoding() and OutputStreamWriter.getEncoding() return 
> canonical names on the given charsets instead of historical ones. For example,
>     new OutputStreamWriter(new ByteArrayOutputStream(), 
> "UTF-16BE").getEncoding()
> has to return the "UnicodeBigUnmarked" string as a historical name. But it 
> returns "UTF-16BE", that is a canonical name.
> The java spec reads the historical names as the charset names defined for 
> compatibility with previous versions of the Java platform.

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

Reply via email to