原文:wire_format.cc:1091] String field 'accountid' contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.

原因: 在protobuf 的string字段中存在中文,序列化的时候会出现截断数据,string这个类型带有检查功能 解决方法: 把protobuf中存在中文的string字段类型 改为bytes string的序列化函数多以下代码 ::google::protobuf::internal::WireFormat::VerifyUTF StringNamedField this gt strde ...

2017-08-04 09:18 0 2350 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM