Re: [protobuf] How to tell a regular string or embedded message ?

2010-04-15 Thread Marc Gravell
In the case you don't have the definition (perhaps a network inspector), you could always *try* to parse it as UTF8 - if it passes as UTF8 the chances are fairly good that it truly is a UTF8 string - and the confidence should go up as the string gets longer (since the chance of a random .proto

Re: [protobuf] How to tell a regular string or embedded message ?

2010-04-15 Thread Marc Gravell
d'oh! Engage brain, then talk! Yes, you're entirely right; testing it as a sub-message and trying UTF8 as a fallback makes a lot more sense. Marc On 16 April 2010 03:23, Kenton Varda ken...@google.com wrote: On Thu, Apr 15, 2010 at 2:55 PM, Marc Gravell marc.grav...@gmail.comwrote: In the