Thanks you nailed it. I thought the generated proto file was the same but
they were slightly different between the C++ and C# repositories I was
working with. This will get me to use git submodule. Thanks again.


On Wed, 4 Jan 2017 at 15:05 Tim Kientzle <[email protected]> wrote:

>
> On Jan 4, 2017, at 11:57 AM, Jamie Sherman <[email protected]>
> wrote:
>
> So I forced the message to have fixed values:
>
> C#
>             xsetHeader.TotalXicSets = 10;
>             xsetHeader.WiffName = "myWiffNameHolder";
>
> hexdump of message:
>
> 080a12106d79576966664e616d65486f6c646572
>
> C++
>
>         XicHeader test;
>         test.set_totalxics(10);
>         test.set_wiffname("myWiffNameHolder");
>         test.SerializeToOstream(of);
>
> hexdump of message:
>
> 080a1a106d79576966664e616d65486f6c646572
>
>
>
> It looks like you have two incompatible versions of your proto file
> floating around.  You should look through your source code very
> carefully to see how that happened.
>
> Your C# code thinks the `wiffName` field is field #2 (the third byte there
> is 0x12 = 2 * 8 + 2).
>
> Your C++ code thinks the `wiffName` field is field #3 (the third byte is
> 0x1a = 3 * 8 + 2).
>
> Also, both are correctly writing UTF-8 strings into the output.
>
> Tim
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to