-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support Unicode domain names #10
Comments
There's now a summary of the issue here: For certs, I think both the punycoded and Unicode version of the domain should be accepted, for compatibility. |
The idea of Unicode normalization is still being discussed. If it should happen, golang.org/x/text/unicode/norm should be used. If normalization should happen, then it should be applied at the highest level, right after receiving user input and before anything else like sending the URL or punycoding it. (It should not happen in go-gemini.) Only NFC normalization should be used. Not NFD, NFKC, or NFKD. Relevant article: https://blog.golang.org/normalization Probably what should happen is that Unicode normalization is something a client can do to be nice, but isn't required by the spec. Questions
|
This was added in 1aaf92e.
|
This all applies ONLY to domain names. Only IDNs are being talked about here, not IRIs.
For example for
gemini://gémeaux.bortzmeyer.org/
:Source
The solution to this is not standardized yet, but it should probably be:
Convert to Unicode for domains to serverThis is a weird mix that will create invalid URLs. I no longer think it makes sense.This should be applied no matter whether the domain is actually punycoded already or in Unicode already, etc. Punycoding an already punycoded domain has no ill-effect.
Domains in link lines should maybe also be subject to this, meaning that for domains only, Unicode would be allowed in a gemtext link line? Probably not, this would be an IRI.
Punycoding can be done with golang.org/x/net/idna.
The text was updated successfully, but these errors were encountered: