Display a more helpful error when the locale is wrong

This commit is contained in:
Damien Elmes 2023-01-04 19:01:46 +10:00
parent f2bb0395bf
commit bc6975973e

View file

@ -12,7 +12,9 @@ if sys.version_info[0] < 3 or sys.version_info[1] < 9:
try:
"テスト".encode(sys.getfilesystemencoding())
except UnicodeEncodeError as exc:
raise Exception("Anki requires a UTF-8 locale.") from exc
print("Anki requires a UTF-8 locale.")
print("Please Google 'how to change locale on [your Linux distro]'")
sys.exit(1)
from .package import packaged_build_setup