summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2005-02-11 17:59:08 (GMT)
committerFred Drake <fdrake@acm.org>2005-02-11 17:59:08 (GMT)
commit22c0706a584fc0de8648d24caa0520367c304235 (patch)
tree189b6217f2115a2432e4d37f0f33d0f30efd98d9 /Lib/xmlrpclib.py
parent438024258078d46e76c55cbf35d387725034be19 (diff)
downloadcpython-22c0706a584fc0de8648d24caa0520367c304235.zip
cpython-22c0706a584fc0de8648d24caa0520367c304235.tar.gz
cpython-22c0706a584fc0de8648d24caa0520367c304235.tar.bz2
fix decoding in _stringify to not depend on the default encoding
(closes SF bug #1115989)
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r--Lib/xmlrpclib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 21cc3d0..13a7562 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -173,7 +173,7 @@ if unicode:
def _stringify(string):
# convert to 7-bit ascii if possible
try:
- return str(string)
+ return string.encode("ascii")
except UnicodeError:
return string
else: