You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/11/21 12:53:03 UTC
[jira] Commented: (HARMONY-139) ICU - characters 0x0384 and 0xB7
are unmapped in ICU implementation of ISO8859-7
[ http://issues.apache.org/jira/browse/HARMONY-139?page=comments#action_12451609 ]
Paulex Yang commented on HARMONY-139:
-------------------------------------
I had same issue recently, the problem is still reproducible on the ICU4JNI/ICU4C version Harmony current uses(3.4), and I checked the mapping table of latest version(3.6), seems nothing changed here.
> ICU - characters 0x0384 and 0xB7 are unmapped in ICU implementation of ISO8859-7
> --------------------------------------------------------------------------------
>
> Key: HARMONY-139
> URL: http://issues.apache.org/jira/browse/HARMONY-139
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Vladimir Strigun
> Priority: Minor
>
> Looks like characters 0x0384 and 0xB7 are unmapped in ICU implementation. Mapping table could be found here: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT
> Please use test below for reproducing:
> import java.nio.*;
> import java.nio.charset.*;
> import com.ibm.icu4jni.charset.CharsetProviderICU;
> import junit.framework.TestCase;
> public class Harmony139 extends TestCase{
> public static void main(String args[]){
> junit.textui.TestRunner.run(Harmony139.class);
> }
> public void testEncode_JIRA139_1() throws Exception {
> CharsetProviderICU provider = new CharsetProviderICU();
> Charset iso8859_7 = provider.charsetForName("ISO-8859-7");
> // Uncomment code below to use RI charset
> //Charset iso8859_7 = Charset.forName("ISO-8859-7");
> CharBuffer cb = CharBuffer.allocate(1);
> cb.put((char)0x0384); cb.flip();
> ByteBuffer bb = iso8859_7.newEncoder().replaceWith(new byte[] {0x3F}).onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).encode(cb);
> assertEquals((byte)0xB4, bb.get(0));
> }
> public void testEncode_JIRA139_2() throws Exception {
> CharsetProviderICU provider = new CharsetProviderICU();
> Charset iso8859_7 = provider.charsetForName("ISO-8859-7");
> // Uncomment code below to use RI charset
> //Charset iso8859_7 = Charset.forName("ISO-8859-7");
> CharBuffer cb = CharBuffer.allocate(1);
> cb.put((char)0xB7); cb.flip();
> ByteBuffer bb = iso8859_7.newEncoder().replaceWith(new byte[] {0x3F}).onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).encode(cb);
> assertEquals((byte)0xB7, bb.get(0));
> }
> }
> Both tests passed with RI, and failed with Harmony.
--
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