I had a problem establishing a connection to the server with some accents (é è ô ...) in the host name.
For instance:
String oUrl = "www.hôtel.fr";
System.out.println(oUrl);
InetSocketAddress isa = new InetSocketAddress(oUrl.toString(), 80);
System.out.println(isa.isUnresolved());
ISA is never allowed. He works at www.google.fr.
I tried to execute the URLEncode host (URLEncoder encoded in UTF-8, so the host name is www.h% C3% B4tel.fr) with no result.
Does anyone have any clues? I did not find anything on the Internet.
Thanks and sorry for my english.
source
share