UI 菜单初步完成

This commit is contained in:
2026-09-07 10:48:18 +08:00
parent 89462d8aa1
commit 2b41bdccb5
30 changed files with 2226 additions and 859 deletions
+4 -2
View File
@@ -85,8 +85,10 @@ def main():
chars |= collect(open(f, encoding='utf-8-sig', errors='ignore').read())
s = ''.join(sorted(chars))
out_path = os.path.join(ROOT, 'ui_cn_chars.txt')
with open(out_path, 'w', encoding='utf-8') as fp:
fp.write(s)
# newline='' 关闭行尾转换:恒输出 LF(与 gen_menu.py / make_font.py 一致),
# 避免同一脚本在 Windows 出 CRLF、Linux 出 LF 导致提交产物跨平台 diff
with open(out_path, 'w', encoding='utf-8', newline='') as fp:
fp.write(s + '\n')
print('scanned %d files; unique non-ASCII chars: %d' % (len(SCAN), len(s)))
print('->', out_path)