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

XMLWordPrintableJSON

    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            DO NOT USE - Backlog - Platform Team
            Reporter:
            Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: