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

Mongo shell in Windows doesn't display Unicode when console is set to Terminal font

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.2.0-rc0
    • 2.1.2
    • Shell
    • mongodb server 2.1.2 2008+ build on windows 7 x64
    • Fully Compatible
    • Windows

    Description

      New description:
      When the Windows console is set to use the "Terminal" font (a non-Unicode font), attempts to display (non-ASCII) Unicode text in the Mongo shell instead display nothing. The WriteConsoleW() Windows API returns FALSE and GetLastError() gives 31 as the error code – "A device attached to the system is not functioning.". Changing the console font to "Consolas" or "Lucida Console" makes Unicode output work again.

      mongorestore the attached bson document. from the shell do a db.<coll>.find(). Even though the document exists and returns as part of the cursor, it does not display in the shell
      > db.jira.count()
      1
      > var cursor = db.jira.find()
      > var ret = cursor.next()
      > ret._id
      ObjectId("4feccef2f19b9ad092ad9e5b")

      Note this issue does not exist in 2.1.1. It seems to be a problem with 2.1.2 and today's build.

      Due to this findOne does not return anything if this is the first document found

      Attachments

        Activity

          People

            tad Tad Marshall
            sridhar Sridhar Nanjundeswaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: