Skip to content

Commit 9713a9a

Browse files
committed
[3109913] importing matplotlib changes string.letters
svn path=/branches/v1_0_maint/; revision=8812
1 parent cc94c37 commit 9713a9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/cbook.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
# an encoding instead of a valid locale name. Another
2727
# pathological case that has been reported is an empty string.
2828

29+
# On some systems, getpreferredencoding sets the locale, which has
30+
# side effects. Passing False eliminates those side effects.
31+
2932
try:
30-
preferredencoding = locale.getpreferredencoding().strip()
33+
preferredencoding = locale.getpreferredencoding(False).strip()
3134
if not preferredencoding:
3235
preferredencoding = None
3336
except (ValueError, ImportError, AttributeError):

0 commit comments

Comments
 (0)