C
C#9mo ago
Project B

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
Jimmacle
Jimmacle9mo ago
per the protobuf spec, strings are always encoded as UTF-8
Jimmacle
Jimmacle9mo ago
Language Guide (proto 3)
Covers how to use the version 3 of Protocol Buffers in your project.
Jimmacle
Jimmacle9mo ago
if you're asking if you can change C#'s string itself to use UTF-8 internally, the answer is no
Project B
Project BOP9mo ago
Thank you!
Want results from more Discord servers?
Add your server