UI 菜单初步完成
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user