harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-137) CharsetDecoder should replace undefined bytes with replacement string
Date Tue, 28 Feb 2006 10:20:46 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-137?page=all ]
     
Tim Ellison resolved HARMONY-137:
---------------------------------

    Resolution: Won't Fix

For the reasons Richard and the ICU team give, this is being marked as won't fix.


> CharsetDecoder should replace undefined bytes with replacement string
> ---------------------------------------------------------------------
>
>          Key: HARMONY-137
>          URL: http://issues.apache.org/jira/browse/HARMONY-137
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Vladimir Strigun
>     Priority: Minor

>
> Corresponding to cp1250 mapping table, 0x81 byte is undefined. See http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT
> So, charset decoder should replace undefined bytes with default replacement, i.e. 0xFFFD.

> Testcase for reproducing this issue:
> import java.nio.charset.*;
> import java.nio.*;
> public class Harmony137 {
>     public static void main(String[] args) throws Exception {
>         ByteBuffer bb = ByteBuffer.allocate(5);
>         bb.put((byte)0x81); bb.flip();
>         Charset cp1250 = Charset.forName("cp1250");
>         CharBuffer cb = cp1250.newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).decode(bb);
>         if(cb.get(0)!=65533) {
>             System.out.println("FAIL: expected 0xFFFD but result is: 0x"+Integer.toHexString(cb.get(0)).toUpperCase());
>         }
>     }
> }

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


Mime
View raw message