Spark's Work

Showing Chinese characters in html

As I was moving older posts to this new site, I decided to put large tables in a separate html file, which, upon clicking, would pop up a new window for viewing the content (see e.g. here).

At first, the table was not displaying Chinese characters correctly (only showing a bunch of weird symbols). A quick search on the Internet led to a simple solution (here): just add <meta charset="utf-8"> at the beginning of the html file.

The same goes for .txt files when they are not correctly displaying Chinese/Japanese/... characters. To solve the problem, change to the correct encoding method and re-save the file.