7

Some questions, for example

What is the '😋' character?

Instead of using a correct URL, such as

http://meta.stackexchange.com/questions/79543/٩●̮̮̃-̃۶-forbid-unicode

are using

https://superuser.com/questions/516363/what-is-the-��-character

What is causing this behavior?

  • The Meta post URL http://meta.stackexchange.com/questions/79543/٩●̮̮̃-̃۶-forbid-unicode is not a valid URL either. I'm not saying the replacement characters are any more valid, but anything outside the ASCII range would have to be encoded in a URL. Browsers may elect to display decoded characters though. – Martijn Pieters Oct 7 '14 at 10:22
  • E.g. the correct current URL is http://superuser.com/questions/516363/what-is-the-%ef%bf%bd%ef%bf%bd-character. The Meta post URL is http://meta.stackexchange.com/questions/79543/%d9%a9%e2%97%8f%cc%ae%cc%ae%cc%83-%cc%83%db%b6-forbid-unicode. – Martijn Pieters Oct 7 '14 at 10:24
10

The Stack Exchange Title-to-URL-slug converter cannot handle characters outside the BMP (the Basic Multilingual Plane), running from U+0000 through to U+FFFF.

The character in question, U+1F60B, is encoded to UTF-16 using a surrogate pair instead, so you get U+D83D U+DE0B, and those are not 'displayable' (not valid Unicode) and get replaced by two U+FFFD characters on conversion to UTF-8.

The correct UTF-8 conversion would be F0 9F 98 8B, so the URL should be:

http://superuser.com/questions/516363/what-is-the-%f0%9f%98%8b-character

which my browser then happily displays as

http://superuser.com/questions/516363/what-is-the-😋-character

(if an Emoji is displayed depends on your font and OS).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .