Nicolas.Williams at oracle.com
Thu Jun 17 00:18:16 CEST 2010
On Tue, Jun 15, 2010 at 11:45:38PM +0200, Simon Josefsson wrote:
> That could be tried in an experiment, but I believe any effort to make
> that the default, or even any effort to standardize anything here,
> should be co-ordinated with the Austin group. That is also really the
> place where the POSIX experts hang out and can tell whether this is a
> good idea or not, from a POSIX standardization point of view.
Hmmm, actually, POSIX/SUS cannot really control what is a canonical
hostname here. That's for the name services standards to decide, not
for the API. And since these functions do not list aliases, and since
aliases are clearly supported by a variety of name service, it's clear
- making getaddrinfo() support lookups by IDNs encoded in the caller's
locale's codeset, converting to Unicode and applying IDNA as
necessary, is perfectly legitimate
- making getaddrinfo() return either A-labels or U-labels (in the
converted to the caller's locale's codeset) as ai_canonname when
AI_CANONNAME is requested is also perfectly legitimate
However, returning anything other than A-labels risks leaking of IDNs
into IDN-unaware slots by IDN-unaware applications.
Therefore I think that getaddrinfo() should support lookups by IDNs
encoded in the caller's locale's codeset as described above, but should
return A-labels unless a hint is given that U-labels are preferred.
More information about the Idna-update