,----
| Because these resolver libraries today expect only domain names in
| ASCII, applications MUST prepare labels that are passed to the resolver
| library using the ToASCII operation. Labels received from the resolver
| library contain only ASCII characters; internationalized labels that
| cannot be represented directly in ASCII use the ACE form. ACE labels
| always include the ACE prefix.
`----
I think the IDNA specification gives poor recommendations in this
area, an area which doesn't even concern the IDNA protocol itself.
But this recommendation is irrelevant for gethostname (and likewise
getaddrinfo). For ToASCII, the assumption is that the input is a
sequence of Unicode characters. gethostname does not expect Unicode
characters, but char*.