python 3 doesn't save us from misconfigured locales

This commit is contained in:
Damien Elmes 2017-09-02 13:59:10 +10:00
parent a7ed7fa4e3
commit 62a1382c0d

View File

@ -7,6 +7,9 @@ import sys
if sys.version_info[0] < 3 or sys.version_info[1] < 6: if sys.version_info[0] < 3 or sys.version_info[1] < 6:
raise Exception("Anki requires Python 3.6+") raise Exception("Anki requires Python 3.6+")
if sys.getfilesystemencoding().lower() in ("ascii", "ansi_x3.4-1968"):
raise Exception("Anki requires a UTF-8 locale.")
version="2.1.0beta15" # build scripts grep this line, so preserve formatting version="2.1.0beta15" # build scripts grep this line, so preserve formatting
from anki.storage import Collection from anki.storage import Collection
__all__ = ["Collection"] __all__ = ["Collection"]