protobuf 2.0.3 *forces* Unicode

2009-03-06 Thread Ross Vandegrift
Hi everyone, I have a python app that passes objects using protocol buffers. This app *depends* on the ability to pass strings as strings and not as Unicode objects - data ends up being distributed to routers and switches via SNMP where Unicode causes tons of problems. Prior to 2.0.3, when I

Re: protobuf 2.0.3 *forces* Unicode

2009-03-06 Thread Kenton Varda
You need to use the bytes type instead of string. string has always been defined in the docs as UTF-8, it just wasn't enforced in the Python implementation. On Fri, Mar 6, 2009 at 12:40 PM, Ross Vandegrift r...@kallisti.us wrote: Hi everyone, I have a python app that passes objects using

Re: protobuf 2.0.3 *forces* Unicode

2009-03-06 Thread Ross Vandegrift
On Fri, Mar 06, 2009 at 12:58:08PM -0800, Kenton Varda wrote: You need to use the bytes type instead of string. string has always been defined in the docs as UTF-8, it just wasn't enforced in the Python implementation. Aha, that did it. Switching to bytes and I get strings out. Thanks for