-
Bug
-
Resolution: Fixed
-
P2
-
1.1.6, 1.2.0
-
beta
-
x86, sparc
-
solaris_2.6, solaris_7, windows_95
Name: rm29839 Date: 05/20/98
It seems that when using ISO2022KR charset to
encodes a string,it encodes with ESC 'A' sequence
rather than with ESC 'C'. But when decoding it
requires a ESC 'C' sequence (which is correct).
It happens on both JDK1.1.4 and JDK1.2 beta 3.
The below is the source use for testing..
In the generated output.txt, you can see that the
Esc sequence generated is wrong.
import java.io.*;
public class ISO2022 {
public static void main (String args[])
{
String m_encoding="ISO2022KR";
String output_text="key in some korean text here µóµù¢¾Öabcd";
File m_file = new File ("output.txt");
try {
FileOutputStream oStream = new FileOutputStream(m_file);
OutputStreamWriter encode_writer = new OutputStreamWriter( oStream, m_encoding);
BufferedWriter b_writer = new BufferedWriter(encode_writer);
b_writer.write (output_text, 0, output_text.length());
b_writer.flush();
System.out.println("Encoding succeed" + output_text);
}
catch (IOException ie)
{
System.out.println ("Encoding not supported!!!!!");
}
} //main
} // iso2022
(Review ID: 28803)
======================================================================
- relates to
-
JDK-4208866 RFE: Unsupported encodings: EUC-JP, ISO-2022-KR, and EUC-KR
-
- Resolved
-