Skip to content

Commit

Permalink
MAINT: Prefer FS encoding over UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Jan 21, 2019
1 parent 987d5b0 commit 5a4bcc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,8 @@ def _validate_usecols_arg(usecols):
# see gh-13253
#
# Python 2.x compatibility
usecols = {col.encode("utf-8") for col in usecols}
encoding = sys.getfilesystemencoding() or "utf-8"
usecols = {col.encode(encoding) for col in usecols}

return usecols, usecols_dtype
return usecols, None
Expand Down

0 comments on commit 5a4bcc1

Please sign in to comment.