Can you try: protoc [various options] < payload.txt
So that the content will be read as STDIN to protoc. On Tue, Jul 5, 2011 at 10:12 PM, Ravi <ravikumarkulan...@gmail.com> wrote: > Hi, > > I tried that also. I pasted the payload directly in the command prompt > when it asked. > I got following error. > > "Failed to parse input." > > Thanks, > Ravikumar K > > On Jul 5, 7:06 pm, Pherl Liu <liuj...@google.com> wrote: > > The protoc reads the input from STDIN. If you pass the payload file name > as > > parameter, protoc will treat that file as a ".proto" file. You should > pipe > > the payload to protoc instead. > > > > On Tue, Jul 5, 2011 at 7:30 PM, Ravi <ravikumarkulan...@gmail.com> > wrote: > > > Hi, > > > > > I am trying to convert a protobuf stream in to a readable format. I > > > got following exception. > > > > > protobuf.txt:2:1: Invalid control characters encountered in text. > > > protobuf.txt:2:2: Expected top-level statement (e.g. "message"). > > > protobuf.txt:2:9: Invalid control characters encountered in text. > > > > > Steps i tried: > > > 1) Built the protobuf message object and saved the output to a file > > > (protobuf.txt). (tried in java) > > > 2) Used the decode option in command line. The arguments are > > > protoc --proto_path=<proto path> <proto file name> -- > > > decode=<fully qualified message name> <a text file path which contains > > > the protobuf payload> > > > > > protoc --proto_path=D:\Work\ProtoBuf\workspace2_4_0_a\TesteLVIS\src\com > > > \proto D:\Work\ProtoBuf\workspace2_4_0_a\TesteLVIS\src\com\proto > > > \TestSameName.proto --decode=com.ebay.test.Book D:\Work\ProtoBuf > > > \workspace2_4_0_a\TesteLVIS\src\com\proto\protobuf.txt > > > > > Please let me know what i am doing wrong here? > > > is it something related to file encoding? If so how do i resolve it? > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Protocol Buffers" group. > > > To post to this group, send email to protobuf@googlegroups.com. > > > To unsubscribe from this group, send email to > > > protobuf+unsubscr...@googlegroups.com. > > > 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 protobuf@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > 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 protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.