mathiasbynens / mathiasbynens/punycode.js

wrong conversion

Open
#46 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

In the domain business, just few TLDs are based on IDN 2008 punycode conversion:
.be, .ca, .de, .fr, .pm, .re, .swiss, .tf, .wf, .yt
All other TLDs use the IDN 2003 standard.

Just got that information from my team mates (we work in the domain business) and they point out that the npm module "idna-uts46" handles it in the right way (but as said npm based..) and I for sure don't want to switch the library ;) A client-side solution and to avoid async node.js callbacks is still my target.

Example:
fußbälle.de -> fussbälle.de (IDN 2003)
fußbälle.de -> fußbälle.de (IDN 2008) <-- the correct one!
fußbälle.org -> xn--fublle-cta5b.org -> fußbälle.org (which is wrong, has to be IDN 2003).
correct one would be: xn--fussblle-4za.org

used methods toASCII and toUnicode.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the toASCII and toUnicode methods and compare their results for the supplied .de and .org examples. Review the IDN 2003 and IDN 2008 behavior described in the issue; done means the methods produce the stated standard-specific conversions without changing the library to an npm dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.