From a734540e5bf230a2ce2ea5a1c311a3b209dbe388 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 10 May 2012 14:36:59 -0400 Subject: [PATCH] CC-3791: Media Monitor crash when there are media files with non-ascii name in watched folder -fixed with hack... --- python_apps/media-monitor/media_monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor/media_monitor.py b/python_apps/media-monitor/media_monitor.py index 275c59547..8db6df69f 100644 --- a/python_apps/media-monitor/media_monitor.py +++ b/python_apps/media-monitor/media_monitor.py @@ -47,7 +47,8 @@ def configure_locale(): logger.debug("New locale set to: " + locale.setlocale(locale.LC_ALL, new_locale)) - + reload(sys) + sys.setdefaultencoding("UTF-8") current_locale_encoding = locale.getlocale()[1].lower() logger.debug("sys default encoding %s", sys.getdefaultencoding()) logger.debug("After %s", locale.nl_langinfo(locale.CODESET))