import java.nio.charset.Charset;
byte[] cp1251Bytes = new byte[3];
cp1251Bytes[0] = (byte) 0xFD;
cp1251Bytes[1] = (byte) 0xFE;
cp1251Bytes[2] = (byte) 0xFF;
byte[] utfBytes = new byte[6];
utfBytes[0] = (byte) 0xD1;
utfBytes[1] = (byte) 0x8D;
utfBytes[2] = (byte) 0xD1;
utfBytes[3] = (byte) 0x8E;
utfBytes[4] = (byte) 0xD1;
utfBytes[5] = (byte) 0x8F;
String cp1251Str = new String(cp1251Bytes, Charset.forName("CP1251"));
byte[] utfBb = cp1251Str.getBytes(Charset.forName("UTF-8"));
for(byte b: utfBb){
System.out.print((String.format("%x", b)));
}
new Plot(
title: new String(cp1251Bytes, Charset.forName("CP1251")),
xLabel: new String(utfBb, Charset.forName("UTF-8")),
yLabel: new String(utfBytes, Charset.forName("UTF-8")))