diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 9643900..cb40f41 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -47,7 +47,7 @@ def getdefaultencoding(): and usually ASCII. """ enc = sys.stdin.encoding - if not enc: + if not enc or enc=='ascii': try: # There are reports of getpreferredencoding raising errors # in some cases, which may well be fixed, but let's be conservative here.