添加后台进程修复等功能
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import chardet
|
||||
|
||||
def detect_file_encoding(file_path):
|
||||
with open(file_path, 'rb') as file:
|
||||
raw_data = file.read()
|
||||
result = chardet.detect(raw_data)
|
||||
encoding = result['encoding']
|
||||
confidence = result['confidence']
|
||||
print(f"Detected encoding: {encoding}, Confidence: {confidence}")
|
||||
|
||||
file_path = r"C:\Users\zy187\Desktop\销售明细.csv"
|
||||
detect_file_encoding(file_path)
|
||||
Reference in New Issue
Block a user