[Fixed]-Correctly Scraping and Displaying Japanese Characters using Python Django BeautifulSoup and Curl

0👍

The examples you posted are somehow the ascii representation of the string. You need to convert this into a python unicode string. Usually you can use string encoding and decoding to do the job. If you are not sure which one is the correct way simply experiment with it in the python console.

Try my_new_string = my_string.decode('utf-8') to get the python unicode string. This should correctly display in Django templates, can be saved to the DB etc.. As an example you can also just try print my_new_string and will see it is outputting Japanese characters.

Leave a comment