Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1532

Allow invalid UTF-8 strings to be decoded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.2
    • Component/s: None
    • Labels:
      None
    • Case:

      Description

      When decoding a string in BSON, the driver attempts to validate that the string is valid UTF-8, which can cause issues if the data in the database is actually invalid. We should allow users to read out that data, despite it being invalid, because Go strings are just bytes and don't conform to a specific charset.

       

      The existing check is also incorrect because it's only checking single-byte strings, but multi-byte strings can be invalid UTF-8 as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              divjot.arora Divjot Arora
              Reporter:
              divjot.arora Divjot Arora
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: