-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Conversation
Bueller? @epoberezkin? @Julian? @awwright? |
Format names look ok, should I also double check the RFCs? |
@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. |
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"? |
On another hand we don't have "domain", so why should we have "idn"? |
From RFC 5890:
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. |
@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.
Looks good. |
@handrews this all looks both sensical and easily implementable to me. +1. |
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
, andregex
are on their own (the latter of those being introduced in PR #392).