I have some Windows 7 machines on a local network, each with a hostname. One of them is running a Java 8 application that must access another machine via HTTP, so it needs to form a URI containing the server machine's hostname. The machine running the HTTP server has a hostname containing Japanese characters, which are not allowed in URIs.
How do I construct the URI to access the server machine on the local network? RFC 4501, "Domain Name System Uniform Resource Identifiers", says to encode according to RFC 3986, "Uniform Resource Identifier (URI): Generic Syntax", which I would infer to mean percent-encoding of the UTF-8 octets. But RFC 3490, "Internationalizing Domain Names in Applications (IDNA)", says to convert to Punycode.
So which is it, percent-encoding or Punycode? Which encoding will allow a Java application to successfully look up and connect to another Windows 7 machine, containing extended characters in the hostname, on a local network?