Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6086

Unicode/UTF-8 in the shell needs to handle zero-width and double-width characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.1.1
    • 2.7.5
    • Shell
    • None
    • ALL
    • Server 2.7.5

    Description

      Combining characters in Unicode are composed of two adjacent Unicode code units but occupy a single position on the screen. The second code unit of these pairs needs to be treated as a zero-width character so that cursor positioning matches displayed text properly.

      Chinese, Japanese and Korean (CJK) characters will typically occupy two screen positions although they are encoded as a single Unicode code unit. These characters need to be treated as double-width characters so that cursor position matches displayed text properly.

      To reproduce:

      Open mongo shell.
      Insert multi-byte sequence as a find document such as:

      > db.item.find({'type':"한글블라블라블라"})

      Move the cursor to a few characters before the terminating quotation and hit backspace.

      The terminating quotation will disappear.

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              tad Tad Marshall
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: