previous fs encoding test didn't catch things like latin-1
https://forums.ankiweb.net/t/unicodeencodeerror-when-syncing/1746
This commit is contained in:
parent
5a73641b57
commit
760ce2282d
@ -9,7 +9,10 @@ from anki.collection import Collection
|
||||
if sys.version_info[0] < 3 or sys.version_info[1] < 7:
|
||||
raise Exception("Anki requires Python 3.7+")
|
||||
|
||||
if sys.getfilesystemencoding().lower() in ("ascii", "ansi_x3.4-1968"):
|
||||
# ensure unicode filenames are supported
|
||||
try:
|
||||
"テスト".encode(sys.getfilesystemencoding())
|
||||
except UnicodeEncodeError:
|
||||
raise Exception("Anki requires a UTF-8 locale.")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user