harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject UTF-8 decode broken for supplementary characters?
Date Tue, 31 Aug 2010 23:25:43 GMT
Here is a simple roundtrip test that fails:

  public void testUTF8() throws Exception {
    // U+1D11E: MUSICAL SYMBOL G CLEF
    String s = new StringBuilder().appendCodePoint(0x1D11E).toString();
    byte utf8[] = s.getBytes("UTF-8");
    assertEquals(s, new String(utf8, 0, utf8.length, "UTF-8"));
  }

Any ideas? It seems the problems only involve supplementary characters.

Apache Harmony Launcher : (c) Copyright 1991, 2010 The Apache Software
Foundation or its licensors, as applicable.
java version "1.5.0"
Apache Harmony (1.5.0)
DRLVM (1.5.0-r946978)
pre-alpha : not complete or compatible
svn = r946978, (May 22 2010), Windows/ia32/msvc 1310, release build
http://harmony.apache.org

-- 
Robert Muir
rcmuir@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message