From 643baeb3301cb8a6dec4b2c5a2c422ddb94a7f21 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Apr 2011 10:57:13 -0600 Subject: [PATCH] ... --- src/calibre/constants.py | 1 + src/calibre/startup.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/calibre/constants.py b/src/calibre/constants.py index 28dbcc4299..86dd1ada3b 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -45,6 +45,7 @@ fcntl = None if iswindows else importlib.import_module('fcntl') filesystem_encoding = sys.getfilesystemencoding() if filesystem_encoding is None: filesystem_encoding = 'utf-8' + DEBUG = False def debug(): diff --git a/src/calibre/startup.py b/src/calibre/startup.py index fd9ef01141..308308e1f2 100644 --- a/src/calibre/startup.py +++ b/src/calibre/startup.py @@ -61,6 +61,12 @@ if not _run_once: ################################################################################ # Initialize locale + # Import string as we do not want locale specific + # string.whitespace/printable, on windows especially, this causes problems + # Before the delay load optimizations, string was loaded before this point + # anyway, so we preserve the old behavior, explicitly. + import string + string try: locale.setlocale(locale.LC_ALL, '') except: