Golang mgo MongoDB bson.ObjectId非utf-8错误

I'm developing in go on my Mac using mongo and mgo driver.

Everything works great on my Mac. When my friend works on the same codebase from his windows machine, we get these weird non utf-8 bson.ObjectIds.

Here is a screenshot from mongolab.com (a hosted mongo server)

enter image description here

My code simply uses:

thing.Id = bson.NewObjectId() 
thing.eventId = event.Id

Has anyone had this issue? Does anyone know how to deal with that

Edit: All bson functions used in this codebase are:

thing.Id = bson.NewObjectId()
thing.Id = bson.ObjectIdHex(id)
idString = thing.Id.Hex()

Thanks.

The Unicode replacement character in the screenshot suggests that the application is treating object ids as UTF-8 encoded text. Object ids contain binary data, not UTF-8 encoded text.

Use the Hex method to convert an object id to human readable text.

Use ObjectIdHex to convert the hex string representation back to an object id. Be careful to protect the call to ObjectIdHex with IsObjectIdHex.