Text would be broken when receive string value with unicode chars

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      mono on Mac OS X (Snow Leopard), MS CLR (v2.0 & 4.0 RC)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Sam Corder
            Reporter:
            Jeffrey Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: