-
Notifications
You must be signed in to change notification settings - Fork 29
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 punycode #9
Comments
The browser does the appropriate mangling of the URI which we probably would have to implement. |
For now we could just add a URI constructor that converts |
That sounds reasonable. |
I'll make a PR. |
I think the |
punycode is fairly complex - see an example implementation. Is anyone up for having a go at it? |
Roughly two years old at this point...is this still a desirable feature/anyone going to claim this? |
another ~2 years later... The URI part of this seems to currently not-fail in HTTP.jl: julia> x = HTTP.URI("http://☃.net")
HTTP.URI("http://☃.net")
julia> HTTP.URIs.showparts(x)
HTTP.URI("http://☃.net"
scheme = "http",
userinfo = "" (absent),
host = "☃.net",
port = "" (absent),
path = "",
query = "" (absent),
fragment = "" (absent))
julia> HTTP.get("http://☃.net")
ERROR: non-ASCII hostname: ☃.net
Stacktrace:
[1] getaddrinfo(::Function, ::String) at ./socket.jl:619 And there is this: https://github.com/apricis/Punycoder.jl/blob/master/punycoder.jl |
I'm not sure about the details, but it might be nice to allow URIs of non-ASCII text (i.e. use
String
rather thanASCIIString
in the type definition). The RFC is a bit vague on this. Perhaps it isn't technically allowed but it seems possible to encounter in the wild (e.g. ☃.net will resolve in a browser). On a practical level it's somewhat annoying to not be able to passUTF8String
s orSubString
s thereof to methods in Requests.jl.The text was updated successfully, but these errors were encountered: