show mac-specific error only on mac OSX

This commit is contained in:
Steffen Schaumburg 2011-04-07 14:47:55 +02:00
parent b33584c63d
commit d44d1dda3e

View File

@ -210,8 +210,9 @@ DATABASE_TYPES = (
#LOCALE_ENCODING = locale.getdefaultlocale()[1]
LOCALE_ENCODING = locale.getpreferredencoding()
if LOCALE_ENCODING == "US-ASCII":
print _("Default encoding set to US-ASCII, defaulting to CP1252 instead -- If you're not on a Mac, please report this problem.")
LOCALE_ENCODING = "cp1252"
if (os.uname()[0]!="Darwin"):
print _("Default encoding set to US-ASCII, defaulting to CP1252 instead."), _("Please report this problem.")
# needs LOCALE_ENCODING (above), imported for sqlite setup in Config class below