Name: dbT83986 Date: 03/03/99
ConnectException displays corrputed text on Japanese Solaris.
The followings are sample code and console log.
I guess that:
Solaris native code does not encode the localized message that strerr() returns.
On Windows-J, it dispays the message in English, the message is hard-coded in Windows native code.
//////////////////////////////////////////////
import java.net.*;
class exceptionTest {
public static void main (String[] arg) {
int port = 9898; // bogus port
try {
Socket s = new Socket("localhost", port);
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
}
}
}
//////////////////////////////////////
java.net.ConnectException: ??????????????????
java.net.ConnectException: ??????????????????
at java.net.PlainSocketImpl.doConnect(Compiled Code)
at java.net.PlainSocketImpl.connectToAddress(Compiled Code)
at java.net.PlainSocketImpl.connect(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at exceptionTest.main(Compiled Code)
(Review ID: 49029)
======================================================================