代码风格更新以及加入超电的对接

This commit is contained in:
lyf committed 2026-11-25 17:24:46 +08:00
1 parent 957c535bda
commit 9de485e4ef
117 files changed
+9046 -6457

No files matched your search

+2 -2
View File
@@ -28,8 +28,8 @@ END = '公共参数段结束'
def extract(path):
# 文件是 GBK(µVision 习惯),按 gbk 读;失败时退回 gb18030
for enc in ('gbk', 'gb18030'):
# 优先按 utf-8 读取,兼容历史 gbk / gb18030 编码
for enc in ('utf-8', 'gbk', 'gb18030'):
try:
text = open(path, encoding=enc).read()
break