Skip to content

Decoding a a document with lossy utf8 conversion #226

@thijsc

Description

@thijsc

I'm bumping the bson version in the Mongo C driver wrapper to the latest version in thijsc/mongo-rust-driver/pull/58.

We currently decode a few responses from Mongo with lossy utf8 conversion since we found out that sometimes invalid characters kan make it into error responses. We used bson::decode_document_utf8_lossy for this.

It looks like bson::Document::from_reader is the replacement. I don't see a way to have it use lossy encoding. Is there a way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    tracked-in-jiraTicket filed in Mongo's Jira system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions