Ah I see. The first half makes sense, but the combining characters are themselves Unicode characters ([...'👩💻'].length === 3), so it's not just something in how Unicode itself is decoded. It must be something in the punycode spec that states that invisible characters are simply ignored. I just checked and it seems this is the case:
Edit: Actually, it might just be Chromium's implementation, rather than the spec itself. In Firefox, new URL('https://👩💻👨💻.to').href is xn--qq8hb0wb.to/, whereas new URL('https://👩💻👨💻.to').href is xn--1uga01807aca52bc.to/ (a domain name that doesn't resolve). Sure enough, opening 👩💻👨💻.to doesn't work in Firefox (but 👩💻👨💻.to works fine).
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
Yeah it is something I should actually learn properly as the amount of times I get confused between &X2394; and U+212C etc. as ways of encoding emojis is quite embarrassing (as was that sentence probably as like I said, I don't understand it all properly 🤣)!
And punycode was the term I couldn't remember so thanks for that!
Ah I see. The first half makes sense, but the combining characters are themselves Unicode characters (
[...'👩💻'].length === 3
), so it's not just something in how Unicode itself is decoded. It must be something in the punycode spec that states that invisible characters are simply ignored. I just checked and it seems this is the case:Pretty interesting!
Edit: Actually, it might just be Chromium's implementation, rather than the spec itself. In Firefox,
new URL('https://👩💻👨💻.to').href
is xn--qq8hb0wb.to/, whereasnew URL('https://👩💻👨💻.to').href
is xn--1uga01807aca52bc.to/ (a domain name that doesn't resolve). Sure enough, opening 👩💻👨💻.to doesn't work in Firefox (but 👩💻👨💻.to works fine).Yeah it is something I should actually learn properly as the amount of times I get confused between &X2394; and U+212C etc. as ways of encoding emojis is quite embarrassing (as was that sentence probably as like I said, I don't understand it all properly 🤣)!
And punycode was the term I couldn't remember so thanks for that!
It will be converted to punycode, anyway.