Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 551 by again1...@gmail.com: changing type of comments to bytes
http://code.google.com/p/protobuf/issues/detail?id=551

What steps will reproduce the problem?
In descriptor.proto the message Location are defined as following:
message Location {
    repeated int32 path = 1 [packed=true];
    repeated int32 span = 2 [packed=true];
    optional string leading_comments = 3;
    optional string trailing_comments = 4;
}
Both the type of leading_comments and trailing_comments are string. I think it's better to change the type string into bytes because not all protobuf comments are written in utf8 or ascii.

As in my case, I use c++ to serialize a gbk encoded protobuf file into FileDescriptorProto and deserialize it using python.

I successfully serialized the gbk encoded comments into FileDescriptorProto using c++(protobuf has no python compiler) but failed to deserialize it using python because the comments are encoded in gbk.

I think it's unreasonable to care about the encoding of comments of protobuf files. So maybe it's better to use bytes here.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?

protobuf-2.5.0

Please provide any additional information below.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to