Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7e0a51

Browse files
committed
Merged revisions 8812 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v1_0_maint ........ r8812 | mdboom | 2010-11-30 12:35:39 -0500 (Tue, 30 Nov 2010) | 2 lines [3109913] importing matplotlib changes string.letters ........ svn path=/trunk/matplotlib/; revision=8813
1 parent 206100b commit c7e0a51

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/matplotlib/cbook.py

Lines changed: 4 additions & 1 deletion
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)