News for hackers. Stuff that matters.
Re:Displaying Japanese and English Text on the Web by greglindahl on Friday February 08, 2019 @03:43PM (#19118467)
The advice about utf-8 encoding is a bit incomplete. While adding <meta charset="utf-8" /> is a good idea, it's also important to make sure that the webserver isn't sending an http Content-Type header that's something other than utf-8.

In HTML5, the browser is supposed to not sniff the document for a meta charset if the server headers specify a charset in the Content-type.

Re:Displaying Japanese and English Text on the Web by kevin_thibedeau on Friday February 08, 2019 @05:53PM (#19119452)
I've been scraping some Japanese sites lately and this has been a minor annoyance. Content-Type rarely has the encoding and Requests doesn't default to UTF-8 so you get mojibake for EUC-JP and UTF-8 unless you intervene.