[GODRIVER-2053] Not able to find Chinese character Created: 18/Jun/21  Updated: 27/Oct/23  Resolved: 02/Aug/21

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Unknown
Reporter: Yong Wei Lun Assignee: Benji Rewis (Inactive)
Resolution: Gone away Votes: 0
Labels: post-5.0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File char_test.go    

 Description   

I have the following document

 

{{{ _id: ObjectId("60ccadfa1bef75796d4d9739"), id: '视频',
}}}

It can query when i use MongoSH

db.myCollection.find({id: "视频"}).pretty()

 

But when i use go driver, it return ErrNoDocuments

.FindOne(ctx, bson.M{"id": "视频"{color:#d19a66}})



 Comments   
Comment by Benji Rewis (Inactive) [ 02/Aug/21 ]

Ah very odd weilun_95@hotmail.com . I also can't replicate it on v1.5.3 against a 4.4.6 standalone or replica set. I'll close this ticket as "Gone Away" for now, but feel free to comment and re-open if you rediscover the issue/have some steps to reproduce it. Thanks again for your report.

Comment by Yong Wei Lun [ 31/Jul/21 ]

Hi Benji, so weird that I can't replicate now.

Was running on MongoDB 4.4.6 Enterprise and Mongo Go Driver v1.5.3

Comment by Benji Rewis (Inactive) [ 30/Jul/21 ]

Hello again weilun_95@hotmail.com! Apologies for the delay in response and thank you for your patience, we've just finished up our high priority work for the 1.6.0 release.

I'm having trouble reproducing this issue. I've attached the code I'm running under Attachments . I can insert an a document with 视频 as the value for id and find it with FindOne using that filter you've provided.

What version of the Mongo Go driver are you using? And, what version of the MongoDB server are you running against?

Comment by Kevin Albertson [ 22/Jun/21 ]

Hello weilun_95@hotmail.com ! Thank you for the report! We will further investigate this after we have completed high priority work for the 1.6.0 release. Thank you for your patience.

Comment by Yong Wei Lun [ 18/Jun/21 ]

 

Not able to edit the description above, retype the code snippet here.

 

Document

{ _id: ObjectId("60ccadfa1bef75796d4d9739"),  id: '视频' }

 

Mongo shell query (can get result)

db.myCollection.find({id: "视频"}).pretty()

 

Go driver query (can't get result)

.FindOne(ctx, bson.M{"id": "视频"}) // returns ErrNoDocuments 

 

Generated at Thu Feb 08 08:37:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.