原文: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