# HG changeset patch # User paulb # Date 1125010072 0 # Node ID 38ee3975559139da774bf613767bbbb754428009 # Parent ec079caf39c3ff11182c491ef821ac51018998a6 [project @ 2005-08-25 22:47:52 by paulb] Removed explicit filesystem encoding parameter - using locale information instead. diff -r ec079caf39c3 -r 38ee39755591 examples/Common/Calendar/__init__.py --- a/examples/Common/Calendar/__init__.py Thu Aug 25 22:47:34 2005 +0000 +++ b/examples/Common/Calendar/__init__.py Thu Aug 25 22:47:52 2005 +0000 @@ -18,10 +18,15 @@ resource_dir = os.path.join(os.path.split(__file__)[0], "calendars") encoding = "utf-8" - def __init__(self, fsencoding=None): + def __init__(self): if not os.path.exists(self.resource_dir): os.mkdir(self.resource_dir) - self.fsencoding = fsencoding + + if os.path.supports_unicode_filenames: + self.fsencoding = None + else: + import locale + self.fsencoding = locale.getdefaultlocale()[1] def _convert_name(self, name): if self.fsencoding: