Name: dk106046 Date: 10/08/2003
Some IO errors such as 'Broken pipe' are not displayed correctly when running JDK 1.3.1 under the Japanese locale. It appears to be a character conversion issue.
The corruption does not occur on JDK 1.4.x.
Compile and run the following testcase on a Japanese machine to reproduce the problem:
import java.io.*;
import java.net.*;
public class BrokenWrite {
static final int PORT = 2019;
public static void main(String[] args) throws Exception {
ServerSocket ss = new ServerSocket(PORT);
Socket client = new Socket(InetAddress.getLocalHost(),
ss.getLocalPort());
Socket server = ss.accept();
ss.close();
new Thread(new Closer(server)).start();
client.getOutputStream().write(new byte[1000000]);
}
private static class Closer implements Runnable {
private final Socket s;
Closer(Socket s) { this.s = s; }
public void run() {
try {
Thread.sleep(5000);
s.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
This bug looks similar in nature to 4818483 and 4818488, and should probably be corrected in a similar way.
======================================================================
Some IO errors such as 'Broken pipe' are not displayed correctly when running JDK 1.3.1 under the Japanese locale. It appears to be a character conversion issue.
The corruption does not occur on JDK 1.4.x.
Compile and run the following testcase on a Japanese machine to reproduce the problem:
import java.io.*;
import java.net.*;
public class BrokenWrite {
static final int PORT = 2019;
public static void main(String[] args) throws Exception {
ServerSocket ss = new ServerSocket(PORT);
Socket client = new Socket(InetAddress.getLocalHost(),
ss.getLocalPort());
Socket server = ss.accept();
ss.close();
new Thread(new Closer(server)).start();
client.getOutputStream().write(new byte[1000000]);
}
private static class Closer implements Runnable {
private final Socket s;
Closer(Socket s) { this.s = s; }
public void run() {
try {
Thread.sleep(5000);
s.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
This bug looks similar in nature to 4818483 and 4818488, and should probably be corrected in a similar way.
======================================================================