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

mongo shell should handle unpaired UTF-16 surrogates the way browsers and the other drivers do

    XMLWordPrintableJSON

Details

    • ALL

    Description

      The code for native_print() in scripting/engine_spidermonkey.cpp, used by the shell to implement the "print" command and to display the results of queries, generates an exception and a decimal list of character codes when it encounters an unpaired UTF-16 surrogate code (0xD800 through 0xDBFF, not paired with one between 0xDC00 and 0xDFFF). This is unfriendly and not the method recommended by the Unicode standard and is different from what (for example) the Java driver does.

      The shell should instead display unpaired surrogates as the Unicode replacement character, U+FFFD, which looks like an inverse video question mark or a question mark in a diamond depending on the font. No exception should be generated and no error message should be displayed.

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: