equal
deleted
inserted
replaced
74 Charset cset = Charset.forName("EUC_TW"); // CNS11643 |
74 Charset cset = Charset.forName("EUC_TW"); // CNS11643 |
75 ISOEncoder = cset.newEncoder(); |
75 ISOEncoder = cset.newEncoder(); |
76 } catch (Exception e) { } |
76 } catch (Exception e) { } |
77 } |
77 } |
78 |
78 |
|
79 private byte[] bb = new byte[4]; |
|
80 public boolean canEncode(char c) { |
|
81 int n = 0; |
|
82 return (c <= '\u007f' || |
|
83 (n = ((EUC_TW.Encoder)ISOEncoder).toEUC(c, bb)) == 2 || |
|
84 (n == 4 && bb[0] == SS2 && |
|
85 (bb[1] == PLANE2 || bb[1] == PLANE3))); |
|
86 } |
|
87 |
79 /* |
88 /* |
80 * Since ISO2022-CN-CNS possesses a CharsetEncoder |
89 * Since ISO2022-CN-CNS possesses a CharsetEncoder |
81 * without the corresponding CharsetDecoder half the |
90 * without the corresponding CharsetDecoder half the |
82 * default replacement check needs to be overridden |
91 * default replacement check needs to be overridden |
83 * since the parent class version attempts to |
92 * since the parent class version attempts to |