mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-11 19:37:18 +00:00
ignore all non-Chinese characters
This commit is contained in:
parent
9602447a04
commit
43d6dd904b
@ -37,7 +37,7 @@ def check_contain_chinese(check_str):
|
||||
return False
|
||||
|
||||
def changepinyin (title):
|
||||
a = pypinyin.pinyin(title, style=pypinyin.FIRST_LETTER)
|
||||
a = pypinyin.pinyin(title, style=pypinyin.FIRST_LETTER, errors='ignore')
|
||||
b = []
|
||||
for i in range(len(a)):
|
||||
b.append(str(a[i][0]).upper())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user