Switch from UTF-16 to UTF-8 for ProtoBuf
I am making a program where i am serializing a lot of string data to a ProtoBuf file. I want to use UTF-8 rather than (what i think is) UTF-16. I have no idea how to do this or if it even is possible in any moderately easy way.
I am using Visual Studio Community and .NET 8.0
4 Replies
per the protobuf spec, strings are always encoded as UTF-8
Language Guide (proto 3)
Covers how to use the version 3 of Protocol Buffers in your project.
if you're asking if you can change C#'s
string
itself to use UTF-8 internally, the answer is noThank you!