recently, I have been using Python to process bus GPS track data, but I have encountered some coding problems, which are very annoying. The original data is in .gz format. After I decoded it on windows, I converted it into a file in .txt format, but the file contains a lot of garbled code. No matter how to convert the code, it doesn"t work, as shown below:
this is the .gz file and the decompressed file:
txt:
txtutf-8gbkgb2312
so I would like to ask everyone:
1 what code can correct the Chinese garbled in the .gz format file
2 I am now dealing with the data line by line, is there any way to identify that the string contains garbled?