Dnia czwartek, 28 października 2004 01:26, Thiago Macieira napisał: > Jakub Stachowski wrote: > >For the last month I have been working on DNS based service discovery > >(ZeroConf, Rendezvous) for KDE. You can get it from kdenonbeta/kdnssd. > > I have an additional question regarding mDNS and you may be able to answer > it: > > how does it handle IDN domains? In specific, ACE-encoded ones. Well, it doesn't. Multicast DNS specification allows only UTF-8 for national characters encoding. > > Our current resolver code uses Unicode for input and will perform the > necessary conversions to ACE. mDNS, on the other hand, specifies (quote) > > * uses UTF-8, and only UTF-8, to encode resource record names > > and also says that mDNS should respect normal uppercase/lowercase rules. > > I ask that because our current code (in KURL nonetheless) relies on the > fact that ACE-encoded names are equivalent to their full-blown Unicode > counterparts. For now I use KURL only in ioslave and it is converted into QString before sending to dnssd library. So it is not yet a problem. > > So, what happens if: > a) an ACE-encoded hostname is queried in mDNS? > (tentative answer: it's treated as if it were different from the > non-encoded form) > True. > b) a hostname whose case-folding, as per Nameprep (RFC 3491), matches an > existing record? > (tentative answer: it is considered equivalent) > True. > Examples: > 1) original: Thiago-José-Macieira.local > lowercased/case folded: thiago-josé-macieira.local > ACE-encoded: xn--thiago-jos-macieira-kzb.local > > the first two match in mDNS; the third matches only in DNS. > > 2) original: µprocessor.local > lowercased: µprocessor.local > case-folded: μprocessor.local (note that's a mu, not a micro) > also equivalent: Μprocessor.local (that's also a mu) > ACE-encoded: xn--processor-u0g.local > True. > same thing: all but the last must match in all cases; the last one only in > DNS. > > 3) original: fußball.local > lowercased: fußball.local > case-folded: fussball.local > ACE-encoded: fussball.local > (the same thing would happen for ſs -> ss) > Well, just checked and 'fussball.local.' didn't match. > here everything matches, but only because the case-folding rendered it into > ASCII Note that also DNS-SD specification makes UTF-8 encoding mandatory for service names, no matter if it uses mDNS or uDNS. But it probably is only matter of adding new flag to KResolver to prevent it from IDN encoding. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<