<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:11:09 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-6244] Mongo shell in Windows doesn&apos;t display Unicode when console is set to Terminal font</title>
                <link>https://jira.mongodb.org/browse/SERVER-6244</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;New description:&lt;br/&gt;
When the Windows console is set to use the &quot;Terminal&quot; 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 &amp;#8211; &quot;A device attached to the system is not functioning.&quot;.  Changing the console font to &quot;Consolas&quot; or &quot;Lucida Console&quot; makes Unicode output work again.&lt;/p&gt;

&lt;p&gt;mongorestore the attached bson document. from the shell do a db.&amp;lt;coll&amp;gt;.find(). Even though the document exists and returns as part of the cursor, it does not display in the shell &lt;br/&gt;
&amp;gt; db.jira.count()&lt;br/&gt;
1&lt;br/&gt;
&amp;gt; var cursor = db.jira.find()&lt;br/&gt;
&amp;gt; var ret = cursor.next()&lt;br/&gt;
&amp;gt; ret._id&lt;br/&gt;
ObjectId(&quot;4feccef2f19b9ad092ad9e5b&quot;)&lt;/p&gt;

&lt;p&gt;Note this issue does not exist in 2.1.1. It seems to be a problem with 2.1.2 and today&apos;s build.&lt;/p&gt;

&lt;p&gt;Due to this findOne does not return anything if this is the first document found&lt;/p&gt;</description>
                <environment>mongodb server 2.1.2 2008+ build on windows 7 x64</environment>
        <key id="42803">SERVER-6244</key>
            <summary>Mongo shell in Windows doesn&apos;t display Unicode when console is set to Terminal font</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="tad">Tad Marshall</assignee>
                                    <reporter username="sridhar">Sridhar Nanjundeswaran</reporter>
                        <labels>
                            <label>Windows</label>
                    </labels>
                <created>Thu, 28 Jun 2012 22:58:03 +0000</created>
                <updated>Thu, 5 Nov 2015 15:40:30 +0000</updated>
                            <resolved>Fri, 29 Jun 2012 19:58:03 +0000</resolved>
                                    <version>2.1.2</version>
                                    <fixVersion>2.2.0-rc0</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="138083" author="tad" created="Fri, 29 Jun 2012 19:58:03 +0000"  >&lt;p&gt;Documentation should mention that the shell can only display Unicode text correctly in Windows when the console is set to use a Unicode font.  This is set through the Properties dialog for the console window, on the Font tab.  Unicode fonts available in Windows 7 are &quot;Consolas&quot; and &quot;Lucida Console&quot;.  The &quot;Raster Fonts&quot; setting selects an OEM (non-Unicode) font, and Unicode (non-ASCII) characters will not display correctly with this font.&lt;/p&gt;</comment>
                            <comment id="138079" author="auto" created="Fri, 29 Jun 2012 19:49:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-06-29T12:43:22-07:00&apos;, u&apos;email&apos;: u&apos;tad@10gen.com&apos;, u&apos;name&apos;: u&apos;Tad Marshall&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6244&quot; title=&quot;Mongo shell in Windows doesn&amp;#39;t display Unicode when console is set to Terminal font&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6244&quot;&gt;&lt;del&gt;SERVER-6244&lt;/del&gt;&lt;/a&gt; behave better when non-Unicode font used with shell&lt;/p&gt;

&lt;p&gt;If the Windows WriteConsoleW() API fails because the console is set&lt;br/&gt;
to a non-Unicode font, display a (hopefully helpful) error message&lt;br/&gt;
once and then display the text anyway.  ASCII parts will display&lt;br/&gt;
fine, non-ASCII parts will display with UTF-8 bytes interpreted as&lt;br/&gt;
if they were OEM characters.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/181ff5d768e45bb4b84622444da9fa3e0181aaa8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/181ff5d768e45bb4b84622444da9fa3e0181aaa8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="137988" author="sridhar" created="Fri, 29 Jun 2012 16:11:28 +0000"  >&lt;p&gt;Confirmed that switching fonts displays this. But the 2.1.1 shell works if the font is Raster Fonts.&lt;/p&gt;</comment>
                            <comment id="137906" author="tad" created="Fri, 29 Jun 2012 13:31:34 +0000"  >&lt;p&gt;It&apos;s the font that is selected in the console window that determines whether it works or not.  If the selected font is &quot;Consolas&quot; or &quot;Lucida Console&quot; then everything works.  If the selected font is &quot;Terminal&quot; (aka &quot;Raster Fonts&quot;) then it fails as described above.  I need to see if we can display at least the available characters (Terminal is an &quot;ANSI&quot;, i.e. non-Unicode, font) in the Terminal font, or convert them to some substitution character, or complain/warn the user.&lt;/p&gt;</comment>
                            <comment id="137896" author="tad" created="Fri, 29 Jun 2012 12:33:02 +0000"  >&lt;p&gt;I tested this at home with a recent build and I was able to reproduce it.  The problem seemed to be with display of Unicode text ... if I displayed the fields one-by-one, only the ones that included Unicode text failed to display.  Then I tried it on a new clean build and was unable to reproduce the problem: all fields, including Unicode text fields, displayed fine.&lt;/p&gt;

&lt;p&gt;Testing at work on a downloaded version from the download page, I can&apos;t reproduce it.  Very odd.&lt;/p&gt;

&lt;p&gt;The problem I saw was consistent with a failure of MultiByteToWideChar; we convert the entire output string in one shot and if the conversion fails, we print nothing.  A failure of WriteConsoleW() might do the same thing ... display nothing.&lt;/p&gt;

&lt;p&gt;A field-by-field loop displays everything that doesn&apos;t include non-ASCII characters, and a character-by-character display of a string that includes non-ASCII characters works on every character except the non-ASCII ones.  In my test that showed the problem, I could display every character in the &quot;text&quot; field except the &#225; (U+00E1, decimal 225) at index 51 in the string.  In my retest now, that character displays fine.&lt;/p&gt;

&lt;p&gt;Sridhar, can you try on other machines or VMs and see if it behaves like this for you?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="17652" name="tweets.bson" size="1484" author="sridhar" created="Thu, 28 Jun 2012 22:58:03 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 29 Jun 2012 12:33:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 33 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 33 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[Windows]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>sridhar</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrny7j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgehr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9257</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10153"><![CDATA[Unneeded]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm75b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>