This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getaddrinfo chokes at hostnames containing "emoji" characters


Florian Weimer wrote:
> On 05/16/2018 10:40 AM, Name Surname wrote:
>> Greetings everyone.
>>
>> I recently bought a domain name containing "emoji" characters, as a
>> novelty and in order to do some experiments. I tried getting the IP
>> address associated to it using getaddrinfo, however, it errs and returns
>> "Name or service not known". The same thing happens with any program
>> that uses glibc for name resolution. I understand that emoji domains are
>> not valid according to IDNA2008, however, some ccTLDs sell them, they
>> were supported according to IDNA2003, and web browsers resolve them
>> normally according to IDNA2003 (at least firefox does).
>>
>> Is this a bug or a feature?
> 
> In the near future, glibc will use the system libidn2 library to 
> implement AI_IDN getaddrinfo support.  You will have to convince the 
> libidn2 maintainers to enable Emoji support (by default), but as long as 
> there is no published standard for that at all (perhaps with the 
> exception of Unicode TR46 transitional mode, which is not recommended), 
> this seems difficult.
> 
> Thanks,
> Florian
> 
> .
> 

Is it not possible to have glibc look the domain up according to 
IDNA2008 first, and, if it fails, lookup using the transistional mode? 
It seems to be what web browsers do, and is most probably what most end 
users would expect to happen. libidn2 has a section on its documentation 
regarding this:
https://libidn.gitlab.io/libidn2/manual/libidn2.html#Converting-with-backwards-compatibility

.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]