Name: rlT66838 Date: 07/11/97
When KANJI "&" char(0x8195) is read on character stream, it is turned into "\"(0x5C).
Other chars near "&", say 0x81??, are read correctly.
[Java Source(ztAmpBug.java)]
import java.io.*;
class ztAmpBug {
public static void main(String args[]) {
String strLine;
try {
BufferedReader brIn = new BufferedReader(
new InputStreamReader(System.in));
while ((strLine = brIn.readLine()) != null) {
System.out.println(strLine);
}
brIn.close();
} catch (IOException exp) {
System.err.println(exp.getMessage());
}
}
}
[Steps to reproduce]
>java ztAmpBug
•
^Z
======================================================================
- duplicates
-
JDK-4050296 CharToByteSJIS converter maps \uff06 to '\'(0x5c), not to multibyte (0x81,0x95)
- Closed