Skip to content

Commit 6978d0f

Browse files
author
y-p
committed
BUG: try harder to avoid ascii encoding GH3360
PTF
1 parent cbd6613 commit 6978d0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ def detect_console_encoding():
16591659
except Exception:
16601660
pass
16611661

1662-
if not encoding: # when all else fails. this will usually be "ascii"
1662+
if not encoding or 'ascii' in encoding.lower(): # when all else fails. this will usually be "ascii"
16631663
encoding = sys.getdefaultencoding()
16641664

16651665
return encoding

0 commit comments

Comments
 (0)