[issue7727] xmlrpc library returns string which contain null ( \x00 )

2021-12-03 Thread Irit Katriel
Irit Katriel added the comment: 2.7 is no longer relevant, and it looks like these examples are working now: >>> xmlrpc.client.dumps(('\u20ac',), encoding='iso-8859-1') '\n\n€\n\n\n' >>> xmlrpc.client.dumps((u'\u20ac',), encoding='iso-8859-1') '\n\n€\n\n\n' There is possibly still a

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2018-09-05 Thread Fredrik Larsen
Change by Fredrik Larsen : -- nosy: +fredrikhl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2017-07-15 Thread Alex Corcoles
Changes by Alex Corcoles : -- versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2017-07-15 Thread Alex Corcoles
Changes by Alex Corcoles : -- nosy: +Alex Corcoles ___ Python tracker ___ ___ Python-bugs-list

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +effbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7727 ___ ___ Python-bugs-list

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updating tests I found some related errors. XML-RPC doesn't work in general case for non UTF-8 encoding: import xmlrpclib xmlrpclib.dumps(('\u20ac',), encoding='iso-8859-1') 'params\nparam\nvaluestring\\u20ac/string/value\n/param\n/params\n'

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file30339/xmlrpc_dump_invalid_string.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7727 ___

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file30343/xmlrpc_dump_invalid_string-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7727 ___

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm still skeptical that a new exception should be introduced in 2.7.x, or 3.3 (might this break existing setups?). I suggest to ask the release manager for a decision. But if this is done, then I propose to add the following text to ServerProxy:

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really understand the issue. If you want to pass binary data (rather than unicode text), you should use a Binary object as explained in the docs: http://docs.python.org/2/library/xmlrpclib.html#binary-objects -- nosy: +pitrou

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: The original report really includes two parts: a) when a string containing \0 is marshalled, ill-formed XML is produced b) the expected behavior is that base64 is used IMO: While a) is correct, b) is not. Antoine is correct that xmlrpclib.Binary should be

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The limitations is already documented: However, it’s the caller’s responsibility to ensure that the string is free of characters that aren’t allowed in XML, such as the control characters with ASCII values between 0 and 31 (except, of course, tab, newline

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: The patch fixes the OP's concern, but not the extended concern about producing ill-formed XML (at least not for 2.7). If the string contains non-UTF-8 data, yet the XML declaration says UTF-8, it's still ill-formed, and not caught by your patch. I

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, 2.7 needs more work. Here is a patch for 2.7. UnicodeError (which subclasses ValueError) can be raised implicitly here, that is why I think ValueError is a good exception. I'll be very grateful to you for your help with a documentation. --

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-21 Thread Mark Lawrence
Mark Lawrence added the comment: Even if the original patch is valid it will need reworking as xmlrpclib isn't in Python 3, the code is now in xmlrpc/client. It also looks as if dump_string has been renamed dump_unicode. -- nosy: +BreamoreBoy ___

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2010-01-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Marshaller.dump_string() encodes a byte string in string.../string using the escape() function. A byte string can be encoded in base64 using base64.../base64. It's described in the XML-RPC specification, but I don't know if all

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2010-01-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Here is an example of patch using the following test: all(32 = ord(byte) = 127 for byte in value) I don't know how much slower is the patch, but at least it doesn't raise an ExpatError: not well-formed (invalid token):

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2010-01-20 Thread Steven Hartland
Steven Hartland steven.hartl...@multiplay.co.uk added the comment: One thing that springs to mind is how valid is that when applied to utf8 data? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7727

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2010-01-17 Thread Steven Hartland
New submission from Steven Hartland steven.hartl...@multiplay.co.uk: When using SimpleXMLRPCServer that is used to return data that includes strings that have a \x00 in them this data is returned, which is invalid. The expected result is that the data should be treated as binary and base64

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2010-01-17 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +loewis priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7727 ___