Issue #17049: Localized calendar methods now return unicode if a locale
includes an encoding and the result string contains month or weekday (was
regression from Python 2.6).
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 2329578..441b2f5 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -492,6 +492,7 @@
     def __enter__(self):
         self.oldlocale = _locale.getlocale(_locale.LC_TIME)
         _locale.setlocale(_locale.LC_TIME, self.locale)
+        return _locale.getlocale(_locale.LC_TIME)[1]
 
     def __exit__(self, *args):
         _locale.setlocale(_locale.LC_TIME, self.oldlocale)