mathiasbynens / mathiasbynens/punycode.js
`toASCII` returns incorrect result
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
While converting various emojis, I've found that very often it is not converting them correctly.
**What I'd expect:**
1.` punycode.toASCII( "❄️🙊" )` should equal "xn--tdix719m" where instead it equals "xn--tdiy444e5vxg" (invalid punycode)
2. `punycode.toASCII( "👰✉️" )` should equal "xn--4bi6168m" where instead it equals "xn--4biw254ehqwg" (invalid punycode)
I could give many more examples, but I haven't found a pattern in the mistake.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two punycode.toASCII examples in the issue and compare the returned strings with the expected values. Investigate the emoji conversion path and RFC 3492/RFC 5891 compliance; done means the reported cases and additional emoji examples produce correct, valid Punycode results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100