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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.2.0-rc0
    • Affects Version/s: 2.1.2
    • Component/s: Shell
    • Environment:
      mongodb server 2.1.2 2008+ build on windows 7 x64
    • Fully Compatible
    • Windows
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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

        1. tweets.bson
          1 kB
          Sridhar Nanjundeswaran

            Assignee:
            Tad Marshall
            Reporter:
            Sridhar Nanjundeswaran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: