test/sun/nio/cs/FindCanEncodeBugs.java

Print this page

        

*** 20,30 **** * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ /* @test ! @bug 5066863 5066867 5066874 5066879 5066884 5066887 5065777 @summary canEncode() false iff encode() throws CharacterCodingException @run main/timeout=1200 FindCanEncodeBugs @author Martin Buchholz */ --- 20,30 ---- * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ /* @test ! @bug 5066863 5066867 5066874 5066879 5066884 5066887 5065777 6730652 @summary canEncode() false iff encode() throws CharacterCodingException @run main/timeout=1200 FindCanEncodeBugs @author Martin Buchholz */
*** 50,62 **** for (Map.Entry<String,Charset> e : Charset.availableCharsets().entrySet()) { String csn = e.getKey(); Charset cs = e.getValue(); ! if (! cs.canEncode() || ! csn.matches("x-COMPOUND_TEXT") || ! csn.matches("x-ISO-2022-CN-CNS")) // ISO2022_CN_CNS supports less continue; //System.out.println(csn); CharsetEncoder enc = cs.newEncoder(); --- 50,60 ---- for (Map.Entry<String,Charset> e : Charset.availableCharsets().entrySet()) { String csn = e.getKey(); Charset cs = e.getValue(); ! if (! cs.canEncode() || csn.matches("x-COMPOUND_TEXT")) continue; //System.out.println(csn); CharsetEncoder enc = cs.newEncoder();