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: