Skip to content

Invalid UTF-8 in strings are not rejected #484

@dsnet

Description

@dsnet

The proto2 and proto3 specifications state that the string type must be encoded as valid UTF-8. Currently the Go implementation neither checks that the string is valid when marshaling, nor checks that the string is valid when unmarshaling. This is contrary to the stated specification and the C++ implementation, which does reject these cases.

However, making this change is likely to break a number of users.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions