From 5e047710eafb99fe94b792872e9d746eb4d0e726 Mon Sep 17 00:00:00 2001 From: Steffen Schaumburg Date: Sat, 9 Apr 2011 20:45:22 +0200 Subject: [PATCH] fix mac OSX startup - now it actually starts Conflicts: pyfpdb/Configuration.py --- pyfpdb/Configuration.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 22395970..0ce87b47 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -207,9 +207,8 @@ DATABASE_TYPES = ( DATABASE_TYPE_MYSQL, ) -LOCALE_ENCODING = locale.getdefaultlocale()[1] -#LOCALE_ENCODING = locale.getpreferredencoding() #this breaks on Mac OSX - please leave this comment -if LOCALE_ENCODING == "US-ASCII": +LOCALE_ENCODING = locale.getpreferredencoding() +if LOCALE_ENCODING in ("US-ASCII", "", None): 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"