Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1920 Binary Type
  3. THRIFT-1726

Ruby-1.9: "binary" fields are represented by string whose encoding is "UTF-8"

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.2
    • Component/s: Ruby - Library
    • Labels:
      None
    • Environment:

      JRuby 1.6.8 using "--1.9" command line parameter.

    • Patch Info:
      Patch Available

      Description

      When reading a thrift object using the Thrift::BinaryProtocol and this thrift object has a field of type "binary", then accessing this field yields a string whose encoding is "UTF-8".
      The encoding should be "ASCII-8BIT" instead. It may be right to assume that "string" fields have a character encoding (such as "UTF-8"), but "binary" fields do not have a character encoding at all. For these cases, there is the pseudo-encoding "ASCII-8BIT" where we deal just with an opaque sequence of bytes.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                xb XB
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: