Qpid
  1. Qpid
  2. QPID-2452

Inconsistent handling on strings between C++ and Python messaging APIs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: C++ Client, Python Client
    • Labels:
      None

      Description

      Description of problem:

      This bug is in reference to the new messaging APIs.

      The handling of strings is different between the C++ and Python messaging APIs.
      The Python API assumes strings on-the-wire are UTF-8 encoded. The C++ API
      apparently uses raw, unencoded octet arrays.

      If a binary string of octets (with some octets > 0x7F), is encoded by a C++
      client and received by a Python client, the Python client will throw an
      exception.

      Version-Release number of selected component (if applicable):

      SVN revision 924529 and prior.

      How reproducible:

      100%

      Steps to Reproduce:
      1. Use the C++ API (qpid::messaging) to produce a map-message (using
      MapContent). One of the map entries should have a string value and should
      contain a sequence such as "!E\xf9\xf5\xdf\x89d\x011\xc0\xc8$7H\x99T"
      2. Use the python client to receive the message.

      Actual results:

      The Python client will throw an exception when it tries to UTF8-decode the
      string.

      Expected results:

      Either Python should use raw-octet encoding or C++ should use UTF8. I expect
      the string seen by the Python receiver to be identical to that sent by the C++
      producer.

        Activity

        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gordon Sim made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Gordon Sim made changes -
        Field Original Value New Value
        Assignee Gordon Sim [ gsim ]
        Ted Ross created issue -

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Ted Ross
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development