18
18
import java .io .ByteArrayOutputStream ;
19
19
import java .io .PrintStream ;
20
20
import java .io .UnsupportedEncodingException ;
21
+ import java .nio .charset .Charset ;
21
22
import java .nio .charset .StandardCharsets ;
22
23
import java .util .concurrent .atomic .AtomicReference ;
23
24
@@ -40,7 +41,7 @@ public void testEncoding8859() throws UnsupportedEncodingException {
40
41
protected void processChangeWindowTitle (String label ) {
41
42
newLabel .set (label );
42
43
}
43
- }, AnsiProcessorType .Emulation , StandardCharsets . ISO_8859_1 , null , null , false ), true , "ISO-8859-1" );
44
+ }, AnsiProcessorType .Emulation , Charset . forName ( "ISO-8859-1" ) , null , null , false ), true , "ISO-8859-1" );
44
45
45
46
ansi .print ("\033 ]0;un bon café\007 " );
46
47
ansi .flush ();
@@ -56,7 +57,7 @@ public void testEncodingUtf8() throws UnsupportedEncodingException {
56
57
protected void processChangeWindowTitle (String label ) {
57
58
newLabel .set (label );
58
59
}
59
- }, AnsiProcessorType .Emulation , StandardCharsets . UTF_8 , null , null , false ), true , "UTF-8" );
60
+ }, AnsiProcessorType .Emulation , Charset . forName ( "UTF-8" ) , null , null , false ), true , "UTF-8" );
60
61
61
62
ansi .print ("\033 ]0;ひらがな\007 " );
62
63
ansi .flush ();
0 commit comments