tanallnight / Blip

A simple open source XKCD Reader
Apache License 2.0
29 stars 6 forks source link

Unicode escape sequences not displayed correctly #26

Open acortelyou opened 7 years ago

acortelyou commented 7 years ago

The XKCD API appears to escape individual utf8 codeunits instead of escaping the entire codepoint causing the app to display the wrong characters.

For example, comic 1814's alt text in the app looks like this:

♫ When the spacing is tight / And the difference is slight / That's a moiré ♫

It should look like this:

♫ When the spacing is tight / And the difference is slight / That's a moiré ♫

The JSON from the server looks like this:

\u00e2\u0099\u00ab When the spacing is tight / And the difference is slight / That's a moir\u00c3\u00a9 \u00e2\u0099\u00ab

When it really should look like this:

\u266B When the spacing is tight / And the difference is slight / That's a moir\u00E9 \u266B