}
{
// Decoder: to Unicode conversion
CharsetDecoder decoderICU = new CharsetProviderICU().charsetForName("ibm-971").newDecoder();
CharBuffer out = CharBuffer.allocate(3);
decoderICU.onMalformedInput(CodingErrorAction.REPLACE);
CoderResult result = decoderICU.decode(ByteBuffer.wrap(new byte[] { (byte)0xA2, (byte)0xAE, (byte)0x12, (byte)0x34, (byte)0xEF, (byte)0xDC }), out, true);
if(!result.isError()){
char[] expected = {'\u00a1', '\ufffd', '\u6676'};
if(!equals(expected, out.array())){
errln("Did not get the expected result for substitution chars. Got: "+