DEV Community

Discussion on: I just bought πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’».to!

Collapse
 
lionelrowe profile image
lionel-rowe

The combined emoji thing is most likely just a font thing in your email client. Most likely different email clients will display it differently.

Collapse
 
grahamthedev profile image
GrahamTheDev

It is to do with the fact that you need a combiner unicode character that isn't supported in domain names.

I get the concept but don't know the right terms, but you combine two emojis with a special character [U+200D] to create the woman at computer or man at computer.

URLs don't support this invisible character (I think because of security) so as far as I am aware it is impossible to fix the issue on Outbound emails as technically my domain name is πŸ‘©πŸ’»πŸ‘¨πŸ’» and it is just how unicode characters are decoded that allow me to have πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» as the domain (as it decodes to the correct characters).

I have no idea if that is a good explanation but sadly I think it can't be fixed in any email client etc.

Collapse
 
lionelrowe profile image
lionel-rowe • Edited

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:

new URL('https://πŸ‘©πŸ’»πŸ‘¨πŸ’».to').href
=== new URL('https://πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’».to').href
// true
Enter fullscreen mode Exit fullscreen mode

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/, 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).

Thread Thread
 
grahamthedev profile image
GrahamTheDev

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!

Thread Thread
 
patarapolw profile image
Pacharapol Withayasakpunt

It will be converted to punycode, anyway.