Skip to content

Internationalized formats #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 28, 2017
Merged

Internationalized formats #408

merged 5 commits into from
Sep 28, 2017

Conversation

handrews
Copy link
Contributor

This addresses #305 (email) and #355 (IRIs), and also adds internationalized domain/host names as they are what the internationalized email addresses are based on.

It's a multi-commit omnibus but if any are controversial they can be split.

I also put ipv4 and ipv6 together in a section as it just reads better like that. Alongside the "Dates and times" section introduced in PR #399, these changes result in most of the formats being grouped into sections by topic. Only uri-template, json-pointer, and regex are on their own (the latter of those being introduced in PR #392).

@handrews handrews added this to the draft-07 (wright-*-02) milestone Sep 15, 2017
@handrews
Copy link
Contributor Author

Bueller? @epoberezkin? @Julian? @awwright?

@handrews handrews requested a review from awwright September 21, 2017 18:13
@epoberezkin
Copy link
Member

Format names look ok, should I also double check the RFCs?

@handrews
Copy link
Contributor Author

@epoberezkin checking the RFC's is always helpful. But mostly I just want to know if you think these formats make sense to have as an implementation author.

@epoberezkin
Copy link
Member

epoberezkin commented Sep 22, 2017

I guess they do, I've been chased to update the existing formats to include international chars, so I definitely prefer separate format names.

The only one that seems inconsistent is "idn"... Maybe "idn-hostname"? I kind of understand why you didn't do it this way as well, but hostname is a wider term than domain name, isn't it? so maybe there should be both "idn" and "idn-hostname"? Or should users use anyOf in case they need "idn-hostname"?

@epoberezkin
Copy link
Member

On another hand we don't have "domain", so why should we have "idn"?

@handrews
Copy link
Contributor Author

handrews commented Sep 22, 2017

From RFC 5890:

The base DNS specifications [RFC1034] [RFC1035] discuss "domain
names" and "hostnames", but many people use the terms
interchangeably, as do sections of these specifications. Lack of
clarity about that terminology has contributed to confusion about
intent in some cases. These documents generally use the term "domain
name". When they refer to, e.g., hostname syntax restrictions, they
explicitly cite the relevant defining documents.

Hostname vs domain name is one of those endlessly debatable things (we certainly debate it endlessly at Cloudflare, which is probably why we just call things "Zones" which is less intuitive than either other option).

Technically "foo.com" can be a hostname, although it's probably a domain name and "a.foo.com", "b.foo.com", etc. are hostnames. Except that they can be "subdomains", etc. etc. etc. TLDs can't be hostnames but if there are other restrictions I can't be bothered to look them up right now.

So I'd be OK with "idn-hostname" for symmetry, but I definitely don't want separate "[idn-]domain" and "[idn-]hostname" because I don't think they would be used properly. Whatever "properly" would even mean.

@handrews
Copy link
Contributor Author

handrews commented Sep 23, 2017

@epoberezkin I'm leaning towards changing "idn" to "idn-hostname".

Given the tendency of people to use "hostname" and "domain name" interchangeably, should we clarify whether we mean strictly hostnames (which imposes some restrictions on what characters are legal in the first component) or whether both hostnames and domain names are considered valid with these formats.

Note that it is apparently not unusual for host names to be configured that violate the hostname restrictions but would be legal domain names.

BTW the force-push just now was a pure rebase, no new changes.

Use "idn-hostname" instead of "idn", and since "hostname" did
not talk about domain names, remove discussion of domain names
from the updated description.
@epoberezkin
Copy link
Member

Looks good.

@Julian
Copy link
Member

Julian commented Sep 28, 2017

@handrews this all looks both sensical and easily implementable to me. +1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants