[SERVER-4412] Some Command don't support Chinese Created: 02/Dec/11  Updated: 11/Jul/16  Resolved: 23/Mar/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3.2

Type: Bug Priority: Major - P3
Reporter: ??? Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mongo 2.0.1


Issue Links:
Duplicate
is duplicated by SERVER-9099 Multiple failures when creating a col... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

When I want to insert a document to a collection witch the collectionName is Chineses characters ,there is a exception happened,

The collectionName is 中国,when I insert a document to this collection,the exception happened..

{ "err" : "invalid ns: mongodb.中国", "code" : 10094, "n" : 0, "connectionId" : 15, "ok" : 1.0 }

at
MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage
message, SafeMode safeMode)
at MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType,
IEnumerable documents, MongoInsertOptions options)
at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object
document, MongoInsertOptions options)
at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object
document, SafeMode safeMode)
at MongoDB.Driver.MongoCollection.Insert[TNominalType](TNominalType
document, SafeMode safeMode)
at
MagicMongoDBTool.Module.MongoDBHelper.InsertEmptyDocument(MongoCollection
mongoCol, Boolean safeMode) in C:\Work Shop\MagicMongoDBTool
\MagicMongoDBTool\Module\MongoDBHelper_Opration.cs:line 344
at
MagicMongoDBTool.frmMain.AddDocumentToolStripMenuItem_Click(Object
sender, EventArgs e) in C:\Work Shop\MagicMongoDBTool\MagicMongoDBTool
\Form\frmMain.cs:line 1505



 Comments   
Comment by Tad Marshall [ 23/Mar/13 ]

This was fixed by commit e7069c1c980a0465ef64dd108a78346a037dd81e.

Comment by Robert Stam [ 02/Dec/11 ]

I suspect that when the collection name is converted to UTF-8 the first byte of the converted collection name has the high bit set and is negative, causing the server's test for a valid connection name to fail.

Generated at Thu Feb 08 03:05:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.