Skip to content
Myr

fix: always use parameter UTF-8 fallback

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Even when the filesystem encoding and sys.argv encoding are the same we should still fall back to trying UTF-8 for decoding command line arguments.

authored by Giel van Schijndel · committed by Giel van Schijndel · parent 58cd5e0 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:click/types.py+2 added
117 unmodified lines
118 try:119 value = value.decode(fs_enc)120 except UnicodeError:121 value = value.decode('utf-8', 'replace')122 else:123 value = value.decode('utf-8', 'replace')124 return value125 return value126127 def __repr__(self):
552 unmodified lines