Fix #883466: don't allow Unicode as arguments to quopri and uu codecs.
diff --git a/Lib/encodings/quopri_codec.py b/Lib/encodings/quopri_codec.py
index b802ae6..d8683fd 100644
--- a/Lib/encodings/quopri_codec.py
+++ b/Lib/encodings/quopri_codec.py
@@ -18,7 +18,8 @@
"""
assert errors == 'strict'
- f = StringIO(input)
+ # using str() because of cStringIO's Unicode undesired Unicode behavior.
+ f = StringIO(str(input))
g = StringIO()
quopri.encode(f, g, 1)
output = g.getvalue()
@@ -33,7 +34,7 @@
"""
assert errors == 'strict'
- f = StringIO(input)
+ f = StringIO(str(input))
g = StringIO()
quopri.decode(f, g)
output = g.getvalue()