[SERVER-5841] mongo shell should handle unpaired UTF-16 surrogates the way browsers and the other drivers do Created: 14/May/12  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: move-sa, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:
Case:

 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.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Generated at Thu Feb 08 03:10:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.