sg16-unicode / sg16

SG16 overview and general information
45 stars 5 forks source link

Domain names #51

Open cor3ntin opened 5 years ago

cor3ntin commented 5 years ago

In one form or another, WG21 will look at networking over the next few years. That will involve domain names.

We should discuss it at some point; It's a complicated topic.

ThePhD commented 5 years ago

There's a UAX for this.

http://www.unicode.org/reports/tr46/

See also:

http://www.unicode.org/reports/tr36/ http://www.unicode.org/reports/tr39/

Our responsibility here is to ensure that people can normalize and work with their text. The technical reports and security reports published by Unicode can be enforced by the people working on Networking using the appropriate tools.

Should they forget, we should gently remind them of such best practices.

cor3ntin commented 5 years ago

At a glance, both windows and linux expect or support utf8 when doing dns query so we could provide only utf8 overload and make the conversions explicit

cor3ntin commented 5 years ago

in the ts:

cor3ntin commented 5 years ago

I've come to the conclusion that there is probably 2 reasonable paths:

In both case allocation may be required, the behavior of non-ascii in the execution encoding methods should probably be undefined ( you can go from local to Unicode, not the other-way around)

That probably calls for actually implementation experience in any-case, lots of platform specific behavior

https://tools.ietf.org/html/rfc3492 https://tools.ietf.org/html/rfc5891

thiagomacieira commented 5 years ago

Need to be able to provide the ACE (ASCII-Compatible Encoding) form of the domain name. When interacting with third party APIs which don't support Unicode, this is the only compatible form.

Obviously it should always be accepted almost everywhere where Unicode is accepted too. There's one exception: when dealing with DNS-SD, since it uses direct UTF-8 instead of Punycode for encoding. A domain like "josé._ssh._tcp.josé.example.com" might encode as "jos\xc3\xa._ssh._tcp.xn--jos-dma.example.com".

tahonermann commented 5 years ago

Thanks for raising this issue, @cor3ntin. This does indeed look complicated.

Two thoughts:

  1. It would be useful to have a paper that explains the issues, relevance for C++, and motivation for providing a solution. Such a paper could include proposed changes to the Networking TS.
  2. We recently discussed creation of a SG16 guidelines for library design document. Assuming we proceed with creating such a thing, a paper that proposes guideline wording for that paper would be appreciated.