添加后台进程修复等功能
This commit is contained in:
@@ -22,4 +22,3 @@ echo.
|
||||
echo =============================
|
||||
echo 报告生成于 %date% %time%
|
||||
echo =============================
|
||||
pause
|
||||
+1
-2
@@ -28,5 +28,4 @@ echo.
|
||||
echo =============================
|
||||
echo 测试完成。
|
||||
echo 诊断时间: %time%
|
||||
echo =============================
|
||||
pause
|
||||
echo =============================
|
||||
@@ -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