From 22c0706a584fc0de8648d24caa0520367c304235 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 11 Feb 2005 17:59:08 +0000 Subject: fix decoding in _stringify to not depend on the default encoding (closes SF bug #1115989) --- Lib/xmlrpclib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/xmlrpclib.py') diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index 21cc3d02ab..13a7562158 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: -- cgit v1.2.1