<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:46:33 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>[CSHARP-3876] Fix surrogate pair handling in CStringUtf8Encoding</title>
                <link>https://jira.mongodb.org/browse/CSHARP-3876</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We are trying to use the following to search a text using Regex. Here is our code:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;string name =&#160;&quot;jm&#128523;&quot;&lt;/p&gt;

&lt;p&gt;var queryExpr = new BsonRegularExpression(name);&lt;br/&gt;
 var filter = Builders&amp;lt;CurrentClass&amp;gt;.Filter.Regex(s =&amp;gt; s.Name, queryExpr);&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Upon running this one, we will received an error showing:&#160;&lt;br/&gt;
 Regular expression is invalid: invalid UTF-8 string&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We try to inspect the query that is being generated from that filter, and surprisingly it doesn&apos;t use the $regex syntax. Here is the generated query:&lt;br/&gt;
 find({ &quot;Name&quot; : /jm&#128523;/ })&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We are expecting the $regex syntax like this one:&#160;&lt;br/&gt;
 find({ &quot;Name&quot; :&lt;/p&gt;

{ &quot;$regex&quot; : &quot;jm\ud83d\ude0b&quot; }

&lt;p&gt;})&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;This is a serious bug on the Regex Filter Builder on the c# Library. Is there a way to use the $regex filter in the Filter Builder strongly type? We want to avoid creating BSON document as possible since it is not strongly typed.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Using latest version of the c# Library: 2.13.1&lt;/p&gt;</description>
                <environment></environment>
        <key id="1881782">CSHARP-3876</key>
            <summary>Fix surrogate pair handling in CStringUtf8Encoding</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="13201">Fixed</resolution>
                                        <assignee username="dmitry.lukyanov@mongodb.com">Dmitry Lukyanov</assignee>
                                    <reporter username="airwyntin@investagrams.com">Air A</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Sep 2021 12:27:30 +0000</created>
                <updated>Sat, 28 Oct 2023 11:47:29 +0000</updated>
                            <resolved>Wed, 29 Sep 2021 00:25:03 +0000</resolved>
                                    <version>2.13.1</version>
                                    <fixVersion>2.13.2</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4104032" author="xgen-internal-githook" created="Wed, 6 Oct 2021 00:12:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Dmitry Lukyanov&apos;, &apos;email&apos;: &apos;dmitry.lukyanov@mongodb.com&apos;, &apos;username&apos;: &apos;DmitryLukyanov&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3876&quot; title=&quot;Fix surrogate pair handling in CStringUtf8Encoding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3876&quot;&gt;&lt;del&gt;CSHARP-3876&lt;/del&gt;&lt;/a&gt;: Builders&amp;lt;T&amp;gt;.Filter.Regex(s =&amp;gt; s.Name, keyword) doesn&apos;t work. (#628)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3876&quot; title=&quot;Fix surrogate pair handling in CStringUtf8Encoding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3876&quot;&gt;&lt;del&gt;CSHARP-3876&lt;/del&gt;&lt;/a&gt;: Builders&amp;lt;T&amp;gt;.Filter.Regex(s =&amp;gt; s.Name, keyword) Doesn&apos;t Work.&lt;br/&gt;
Branch: v2.13.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/2932d77d040ff78e895d4281d8a6198ec5d2d06e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/2932d77d040ff78e895d4281d8a6198ec5d2d06e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4090788" author="dmitry.lukyanov" created="Wed, 29 Sep 2021 00:30:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=airwyntin%40investagrams.com&quot; class=&quot;user-hover&quot; rel=&quot;airwyntin@investagrams.com&quot;&gt;airwyntin@investagrams.com&lt;/a&gt;, most-likely the next patch release will be available next week&lt;/p&gt;</comment>
                            <comment id="4090784" author="xgen-internal-githook" created="Wed, 29 Sep 2021 00:24:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Dmitry Lukyanov&apos;, &apos;email&apos;: &apos;dmitry.lukyanov@mongodb.com&apos;, &apos;username&apos;: &apos;DmitryLukyanov&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3876&quot; title=&quot;Fix surrogate pair handling in CStringUtf8Encoding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3876&quot;&gt;&lt;del&gt;CSHARP-3876&lt;/del&gt;&lt;/a&gt;: Builders&amp;lt;T&amp;gt;.Filter.Regex(s =&amp;gt; s.Name, keyword) doesn&apos;t work. (#628)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3876&quot; title=&quot;Fix surrogate pair handling in CStringUtf8Encoding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3876&quot;&gt;&lt;del&gt;CSHARP-3876&lt;/del&gt;&lt;/a&gt;: Builders&amp;lt;T&amp;gt;.Filter.Regex(s =&amp;gt; s.Name, keyword) Doesn&apos;t Work.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/3480e7219d2f4870d4deca87fae01691befbbc1f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/3480e7219d2f4870d4deca87fae01691befbbc1f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4082672" author="JIRAUSER1254838" created="Fri, 24 Sep 2021 10:21:30 +0000"  >&lt;p&gt;Thanks @dmitry lukyanov&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Looking forward to that fix. This is somehow blocker for us since we can&apos;t search it properly. Do you have an estimate timeline on when will the next version be release?&#160;&lt;/p&gt;</comment>
                            <comment id="4081785" author="dmitry.lukyanov" created="Thu, 23 Sep 2021 22:13:14 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=airwyntin%40investagrams.com&quot; class=&quot;user-hover&quot; rel=&quot;airwyntin@investagrams.com&quot;&gt;airwyntin@investagrams.com&lt;/a&gt; ,&lt;/p&gt;

&lt;p&gt;thanks for your report, I can confirm that this is a bug, we will fix it and include in the next release.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4080190" author="JIRAUSER1254838" created="Thu, 23 Sep 2021 12:33:26 +0000"  >&lt;p&gt;This happens to emoji texts, Please use our sample text keyword:&#160;jm&#128523; to reproduce the bug&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzmppr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>