understandinges6
understandinges6 copied to clipboard
Chapter 8 – bad encoding in String Iterators example
trafficstars
The examples in the String Iterators section contain this in the source:
var message = "A 𠮷 B";
and later
A
(blank)
𠮷
(blank)
B
However, it renders as:
var message = "A ð ®· B";
and
A
(blank)
ð ®·
(blank)
B
The error happens before the HTML gets to the client. In other words, it's not a decoding error. A ð ®· B are the actual characters that arrive from the server.
I believe the same issue happens in the Symbols chapter.
The comment says: "console.log(String(freezing)); // "32째"
But the code says: console.log(String(freezing)); // "32°"
https://github.com/nzakas/understandinges6/blob/master/manuscript/06-Symbols.md