You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Spotify web page displays the title correctly:
But if we dig a bit deeper, we'll find the root of the problem:
The Spotify web page:
<title>We'��re There (feat. Chunky) - song and lyrics by Zed Bias, Chunky | Spotify</title>
{// embedded application/ld+json document; most fields are omitted for brevity"@context":"http://schema.googleapis.com/","@type":"MusicRecording","@id":"https://open.spotify.com/track/3NUKBSs5ZrPlxE3KsY5ySG","url":"https://open.spotify.com/track/3NUKBSs5ZrPlxE3KsY5ySG","name":"We'\u0080\u0099re There (feat. Chunky)","datePublished":"2013-11-25"}
Here is a byte-by-byte comparison of hex representations and chars (I marked “invisible” chars as ×):
57 65 27 c2 80 c2 99 72 65 20 54 68 65 72 65 20 28 66 65 61 74 2e 20 43 68 75 6e 6b 79 29 0a
W e ' × × × × r e T h e r e ( f e a t . C h u n k y )
There are definitely some non-printable codepoints: �� / \u0080\u0099 / c2 80 c2 99!
Okay, we need to go a bit more deeper.
Let's assume that there was not the regular ASCII U+0027 ' APOSTROPHEbut the fancy pseudo-typographic one, a.k.a. U+2019 ’ RIGHT SINGLE QUOTATION MARK (see https://en.wikipedia.org/wiki/Apostrophe#Unicode), and try to mess with encodings:
For example, this track: https://open.spotify.com/track/3NUKBSs5ZrPlxE3KsY5ySG (“We're There (feat. Chunky)” by Zed Bias).
The same two garbage symbols with or without Pango markup escape.
On the surface, it seems like a bug in the blocklet:
playerctl
displays the title without any garbage:i3blocks-mpris
running in the console also works fine (somehow):But if we dig a bit deeper, we'll find the root of the problem:
The Spotify web page:
playerctl | hexdump
:i3blocks-mpris | hexdump
:Here is a byte-by-byte comparison of hex representations and chars (I marked “invisible” chars as
×
):There are definitely some non-printable codepoints:
��
/\u0080\u0099
/c2 80 c2 99
!Okay, we need to go a bit more deeper.
Let's assume that there was not the regular ASCII
U+0027 ' APOSTROPHE
but the fancy pseudo-typographic one, a.k.a.U+2019 ’ RIGHT SINGLE QUOTATION MARK
(see https://en.wikipedia.org/wiki/Apostrophe#Unicode), and try to mess with encodings:Bingo! The same
0x80 0x99
.Let's check again: https://www.fileformat.info/info/unicode/char/2019/index.htm (“Unicode Character 'RIGHT SINGLE QUOTATION MARK' (U+2019)”)
A questsion on Stack Overflow on the same topic: https://stackoverflow.com/questions/2477452/%C3%A2%E2%82%AC-showing-on-page-instead-of
BTW,
Yep, exactly the same character sequence as in the aforementioned SO question.
The text was updated successfully, but these errors were encountered: