Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:27:38+00:00 2026-06-17T06:27:38+00:00

I am using xmlrpc to send a string of characters (arbitrary 8-bit character) from

  • 0

I am using xmlrpc to send a string of characters (arbitrary 8-bit character) from a server to a client. As it turns out, the carriage-return character \r (dec 13 hex 0xd) gets suppressed. That is, when the original string consists of the following three characters (represented by their hex-code):

0x3a 0xd 0xa

then I receive on the client side only ‘two’ characters:

0x3a 0xa

How can I configure xmlrpc (in python) so I am able to receive the full, original 3-characters string with 0xd? Is there a way this can be done without using a binary wrapper or something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:27:39+00:00Added an answer on June 17, 2026 at 6:27 am

    When you pass an str object as a string value in XML-RPC, it is encoded and decoded as a string. (BTW, that string should consist of characters allowed in XML, though that is not important in your case.) It is not a binary block, and \r\n is translated to \n when XML is parsed. IMHO, nothing can be done, and no set of options saves the situation.

    Just see what dumps() and loads() from xmlrpclib do to your string:

    >>> from xmlrpclib import dumps, loads
    >>> s = '\x3a\x0d\x0a'
    >>> e = dumps((s,)) # Just a tuple
    >>> e
    '<params>\n<param>\n<value><string>:\r\n</string></value>\n</param>\n</params>\n'
    >>> loads(e)
    ((':\n',), None)
    

    So, when loads() is performed, the \r\n sequence is translated to \n, and \r is lost. You may, of course, use a transformed string (e.g. s.encode('hex') looks quite nice), but, as far as I understand, if you can not alter server behavior (to perform s.decode('hex') on the parameter), nothing can help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using XMLRPC calls from java to python. So my server in python has
I'm building an xmlrpc client with Java using Apache xmlrpc, but couldn't figure out
I'm using XmlRpc to query my Bugzilla server, but when I execute: Map params
I'm using Zend XML-RPC Client library to send XML requests to another non-PHP XML
How using Python I can dynamically generate my call to my xmlrpc server using
I'm using the Magento (1.6.2.0) XMLRPC-API to assign/remove products from a category. I recently
I'm trying to get a simple client/server XMLRPC server setup but I am having
I'm trying to use xmlrpc client from many QThreads. To make sure that only
I'm posting on Wordpress using the XMLRPC Api from Redstone . Although the post
I have an xmlrpc server using Twisted. The server has a huge amount of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.