We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc94c37 commit 9713a9aCopy full SHA for 9713a9a
lib/matplotlib/cbook.py
@@ -26,8 +26,11 @@
26
# an encoding instead of a valid locale name. Another
27
# pathological case that has been reported is an empty string.
28
29
+# On some systems, getpreferredencoding sets the locale, which has
30
+# side effects. Passing False eliminates those side effects.
31
+
32
try:
- preferredencoding = locale.getpreferredencoding().strip()
33
+ preferredencoding = locale.getpreferredencoding(False).strip()
34
if not preferredencoding:
35
preferredencoding = None
36
except (ValueError, ImportError, AttributeError):
0 commit comments