Python: Which encoding is used for processing sys.argv?
- by EOL
What encoding are the elements of sys.argv in, in Python? are they encoded with the sys.getdefaultencoding() encoding?
sys.getdefaultencoding(): Return the name of the current default string encoding used by the Unicode implementation.
PS: As pointed out in some of the answers, sys.stdin.encoding would indeed be a better guess. I would love…