mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
Use passed-in encoding.
This commit is contained in:
parent
fd5bda67db
commit
7aa3c9c3ba
@ -110,11 +110,11 @@ def run_cli_native(verb, *args, **kwargs):
|
||||
# The encoding attribute doesn't change StringIO behavior on Python 2,
|
||||
# but it's there for realism of the emulation.
|
||||
stdin = StringIO(stdin)
|
||||
stdin.encoding = sys.stdin.encoding
|
||||
stdin.encoding = encoding
|
||||
stdout = StringIO()
|
||||
stdout.encoding = sys.stdout.encoding
|
||||
stdout.encoding = encoding
|
||||
stderr = StringIO()
|
||||
stderr.encoding = sys.stderr.encoding
|
||||
stderr.encoding = encoding
|
||||
else:
|
||||
# The new behavior, the Python 3 behavior, is to accept unicode and
|
||||
# encode it using a specific encoding. For older versions of Python 3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user