Skip to content
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

Steps to implementing IDNA/URL in JS #9

Open
1 of 5 tasks
mathiasbynens opened this issue Aug 19, 2013 · 8 comments
Open
1 of 5 tasks

Steps to implementing IDNA/URL in JS #9

mathiasbynens opened this issue Aug 19, 2013 · 8 comments
Assignees

Comments

@mathiasbynens
Copy link
Owner

References

@ghost ghost assigned mathiasbynens Aug 19, 2013
@mathiasbynens
Copy link
Owner Author

As per @annevk’s http://annevankesteren.nl/2014/06/url-unicode, http://unicode.org/reports/tr46/ should be used. It’s compatible with IDNA2003, but uses IDNA2008 data.

@rubys
Copy link

rubys commented Nov 11, 2014

potentially related work: reference implementation, live demo, updated parser spec

@jcranmer
Copy link

jcranmer commented Jan 1, 2015

For what it's worth, I started coding up a UTR#46 implementation in JS. You don't need stringprep/nameprep (you can use http://www.unicode.org/Public/idna/7.0.0/IdnaMappingTable.txt instead, and without detailed Unicode property reflection in JS, you'll have to have a table lookup anyways). Unfortunately, the UTR46 test vectors drove me insane because they don't match the propose as near as I can tell. I did not try to implement the contextual rules, and I gave up on trying to get the bidi rules to match. Since those rules are mostly about what labels are valid and don't otherwise change the mapping, I feel it's okay to ignore them for most JS library purposes.

mathiasbynens referenced this issue in jsdom/whatwg-url Apr 30, 2015
They follow a different RFC than the URL spec references, so we'll have to lowercase ourselves first.
@jcranmer
Copy link

FWIW, I just uploaded some code I have to https://github.com/jcranmer/idna-uts46, which implements much of UTS #46 (sans Bidi and contextual because screw them).

@indolering
Copy link

All of the browsers already implement IDN handling, are you sure we shouldn't advocate for exposing this functionality in ES7? I've never actually pushed for a standard before, but the browser vendors really need to be in lockstep with IDN handling anyway....

@annevk
Copy link

annevk commented Nov 7, 2015

https://url.spec.whatwg.org/#api has some API surface for this, but it's not implemented (yet).

@indolering
Copy link

@annevk Tickets at Kangax and caniuse might increase visibility.

@annevk
Copy link

annevk commented Nov 19, 2015

Go for it. I don't really want to do that having designed the API. Seems better if others advocate for it.

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

No branches or pull requests

5 participants