kronusaturn / lw2-viewer

An alternative frontend for LessWrong 2.0
https://www.greaterwrong.com/
MIT License
61 stars 6 forks source link

Emoji rendering in my inbox, but not in comment thread #36

Closed ChickenProp closed 2 years ago

ChickenProp commented 2 years ago

This comment as well as its grandparent contains a thumbs-up emoji, but in both it renders as "ὄD" for me (an o with a not-umlaut-but-similar over it followed by a D). But the linked comment was a reply to a comment of mine, and when I see it in my inbox, it renders as a thumbs-up emoji.

I have this with both Firefox 78.8.0esr and Chromium "73.0.3683.75 (Developer Build)", on Debian Stretch; and Firefox 93.2.0 on an Android 9.

On LW itself it renders as a thumbs-up.

(To be precise, Chromium renders it as an empty box in my inbox, not as a thumbs-up. But that's also how it renders on LW, so I assume that's something on my end. In the thread it still renders as the oD thing.)

jimrandomh commented 2 years ago

I have this with both Firefox 78.8.0esr and Chromium "73.0.3683.75 (Developer Build)", on Debian Stretch; and Firefox 93.2.0 on an Android 9.

FYI, 2 out of 3 of these browser version numbers are old enough to be serious security problems.

The emoji is U+1F44D, which is in the astral plane. In GreaterWrong, it turned into the codepoint U+1F44 followed by the ASCII letter D. Which suggests to me that a Unicode library somewhere in your stack is doing something extremely cringeworthy.

kronusaturn commented 2 years ago

I believe this is caused by bugs in the JSON library I used, and the solution would be to switch to a different one.

kronusaturn commented 2 years ago

This is fixed by using a patched version of CL-JSON from here https://github.com/chaitanyagupta/cl-json/tree/fix-non-bmp-chars