Decryption - How to use python to decode some Chinese garbled characters?
迷茫
迷茫 2017-07-05 10:35:24
0
3
979

In English win10, I use excel to open a csv file containing Chinese characters exported from other software. The Chinese characters become garbled. If I use python, can I decode it into correct Chinese characters? How to do it?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
曾经蜡笔没有小新

Notepad++ opens the csv and can convert the encoding to utf-8 without BOM, and then check if it is still garbled

巴扎黑

Open the csv with notepad, it will tell you what encoding it is

習慣沉默

You can try the Chardet package, which can detect most commonly used encodings, determine the encoding first, and then convert the encoding. If the encoding cannot be detected, it should be really garbled.

ChardetIntroduction: http://hao.jobbole.com/chardet/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!