-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C#和C++ string类型含中文怎么序列化 #4482
Comments
The content in string field must be in UTF-8 encoding. I'd suggest using
encoding conversion libraries when interact with the string fields, or
change the field type to bytes instead.
…On Thu, Apr 5, 2018 at 9:24 PM Tgsgf ***@***.***> wrote:
C#和C++ 平台下string类型含中文序列化protobuf报错并出现乱码,怎么解决
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4482>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATQyTrYtqE3mckN_nIXa6PNcoPEdhWOks5tlu3igaJpZM4TJfL8>
.
|
@pherl |
how to solve? |
C++ must first convert strings to utf8 for serialization. The conversion is as follows:
|
It works for me and solves the cross language and cross platform encoding problem between my two programs. |
C#和C++ 平台下string类型含中文序列化protobuf报错并出现乱码,怎么解决
The text was updated successfully, but these errors were encountered: