Mercurial > cpython-lru_cache-weakref
changeset 33091:48100a01ac7c 2.3
Ignore the locale's encoding if it is an empty string.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 12 Aug 2004 13:14:20 +0000 |
| parents | 5f33507cb559 |
| children | 20e90e50797d |
| files | Lib/idlelib/IOBinding.py |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/idlelib/IOBinding.py Tue Aug 10 19:02:54 2004 +0000 +++ b/Lib/idlelib/IOBinding.py Thu Aug 12 13:14:20 2004 +0000 @@ -48,7 +48,7 @@ # resulting codeset may be unknown to Python. We ignore all # these problems, falling back to ASCII encoding = locale.nl_langinfo(locale.CODESET) - if encoding is None: + if encoding is None or encoding is '': # situation occurs on Mac OS X encoding = 'ascii' codecs.lookup(encoding) @@ -58,7 +58,7 @@ # bugs that can cause ValueError. try: encoding = locale.getdefaultlocale()[1] - if encoding is None: + if encoding is None or encoding is '': # situation occurs on Mac OS X encoding = 'ascii' codecs.lookup(encoding)
