use getpreferredencoding() instead of getdefaultlocale() to get LOCALE_ENCODING, default to cp1252 if it comes back with US-ASCII (Mac)
This commit is contained in:
parent
725fb04bb8
commit
e29491c25c
|
@ -138,7 +138,11 @@ DATABASE_TYPES = (
|
|||
DATABASE_TYPE_MYSQL,
|
||||
)
|
||||
|
||||
LOCALE_ENCODING = locale.getdefaultlocale()[1]
|
||||
#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"
|
||||
|
||||
########################################################################
|
||||
def string_to_bool(string, default=True):
|
||||
|
|
Loading…
Reference in New Issue
Block a user