On Thu, Oct 6, 2011 at 9:49 AM, Jerry <[email protected]> wrote:
> Simple ( hopefully ) question. I am sending a protocol buffer message > from windows over EMS to a C++ process that is running on linux. The > text payload is generated as follows on my windows system: > > person.toByteString().toStringUtf8(). > Serialized protos are not valid UTF8, and you should never operate on them as Java String objects. You'll get data corruption on the other side, making it unparsable. > > When the c++ side attempts to reanimate my person with the following > code: > > google:protobuf::TextFormat:parseFromString(dataString, &person); > You used the binary format above, but are using the text format here. You should be using Message::ParseFromString() or a similar variant; TextFormat should be paired with the Java TextFormat class. > > The following error is produced: > > "Invalid control characters encountered in text" > > Any help would be greatly appreciated. > > Also, for reasons that are beside the point I am unable to send a > bytes[] between processes at this time. > > Thanks > -Jerry > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
