I have a web scraper application that scraps some Japanese site. The site has UTF-8 encoded Japanese characters. For example,
2017-03-02 17:14:17,862 - __main__ - DEBUG - 出演者: 青山茉利奈
2017-03-02 17:14:17,862 - __main__ - DEBUG - 作者: ひつき
2017-03-02 17:14:17,862 - __main__ - DEBUG - 収録時間: 123分
As you can see, when I do logger.debug()
in the code, the characters are printed on screen correctly. But when I use json.dump()
to dump this data in a json text file, the strings are encoded to something like
"\u53ce\u9332\u6642\u9593": "123\u5206",
This is not what I want. What I want is exactly what I see in the debug log. How can I solve this problem?