Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-27

Text would be broken when receive string value with unicode chars

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • mono on Mac OS X (Snow Leopard), MS CLR (v2.0 & 4.0 RC)

    Description

      Issue: Text broken when receive string value with unicode chars.

      Reason: There's bug in BsonReader.GetString(int length) method. The method uses a 128-bytes buffer to receive string value. Each 128 bytes would be converted to utf-8 string seperately, but it may be only half of an utf-8 char at the end. So the text would be broken when contains unicode chars.

      Hot to fix: Put the complete data received in an StreamMemory before converting to utf-8 string.

      Attachments

        Activity

          People

            sam Sam Corder
            jeffz Jeffrey Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: