[protobuf] Re: Issue 158 in protobuf: Push 2.3.0 maven artifact to repo
Comment #9 on issue 158 by tj.rothw...@gmail.com: Push 2.3.0 maven artifact to repo http://code.google.com/p/protobuf/issues/detail?id=158 It appears that 2.4.0's release beat the 2.3.0 push to Google's maven repository. http://code.google.com/p/google-maven-repository/source/browse/repository/com/google/protobuf/protobuf-java/ I did see 2.3.0 in Maven Central. http://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/ -- 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.
[protobuf] protobuf not handling special characters between Java server and C++ client
We have a Java web server. When this sends some string, for instance, É, this is received as multiple bytes on the C++ client end. As a result something like SÉBASTIEN gets displayed like S2 funny charactersBASTIEN. What I assume is happening internally is that, Java being UTF-16 by default, writes such characters across multiple bytes. In C++, if these characters are handled individually and hence the increase in string length and invalid display. Also if on the C++ client I run, MultiByteToWideChar(CP_UTF8,...), then this gets converted correctly into a wide char. The problem is that I want to avoid using wide characters on the C++ end. Using WideCharToMultiByte(CP_ACP,...) again on wide character in C++, resolves my issue, but I want to avoid this double conversion. As may be evident from above I am naive at Java and Protobuf. Any help on this is appreciated. -- 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.
Re: [protobuf] protobuf not handling special characters between Java server and C++ client
On Jan 25, 2011, at 15:27 , Hitesh Jethwani wrote: As may be evident from above I am naive at Java and Protobuf. Any help on this is appreciated. The Java protocol buffer API encodes strings as UTF-8. Since C++ has no unicode support, what you get on the other end is the raw UTF-8 encoded data. You'll need to use some Unicode API to process it in whatever way your application requires. I suggest ICU: http://site.icu-project.org/ Hope this helps, Evan -- http://evanjones.ca/ -- 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.
Re: [protobuf] ProtocolBuffers and existing classes
No, you cannot refer to arbitrary classes. Doing so would be difficult to support across languages, and significantly complicates features like reflection. On Tue, Jan 25, 2011 at 6:39 AM, Marco@worldcorp mmistr...@gmail.comwrote: Hello i was wondering if protobuffer supports having an already existing class embedded in the message. What i mean: from example i have seen, use writes a .proto buffer and protobuffer generates all related java classes. However, i have already existing classe which i'd like to embed in a .proto file. Is that supported? I guess if protobuffer generates interfaces, i can get away with it and 'rewrite' my code .. but if it has the functionality to use existing classes, that would be appreciated any constraints on existing classes? i guess they all have to implement Serializable thanks and regarsd marco -- 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.comprotobuf%2bunsubscr...@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.
Re: [protobuf] Re: cannot get extensions from serialized proto -- please help
Are you looking for something more explicit than http://code.google.com/apis/protocolbuffers/docs/reference/java/com/google/protobuf/MessageLite.Builder.html#mergeFrom(com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite) ? Perhaps this isn't obvious unless you know what you're looking for? On Mon, Jan 24, 2011 at 9:10 AM, hp hardi...@gmail.com wrote: Thanks a lot. ExtensionRegistry resolved the issue. I didnt find this in any of documentation. Sorry for late response.. I tried this after reading in another post and worked!!! Thanks Again!. On Jan 21, 1:40 pm, Jason Hsueh jas...@google.com wrote: You didn't provide a code snippet, so it's hard to say, but I would guess that you need to provide an ExtensionRegistry and pass that to the parsing method. (It looks like you are working in Java) e.g. ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance(); YourFileContainerProto.registerAllExtensions(extensionRegistry); Results r = Results.parseFrom(data, extensionRegistry); On Fri, Jan 21, 2011 at 8:39 AM, hp hardi...@gmail.com wrote: test below is failing..please please help message Results { extensions 100 to max } message Item1 { extend Resultes { repeated Item1 items = 100; } } message Item2 { extend Resultes { repeated Item2 items = 100; } } Results.getExtension(items) does not return anything when converted to and from byte array.. Works fine otherwise -- 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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2Bunsubscribe@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.- Hide quoted text - - Show quoted text - -- 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.comprotobuf%2bunsubscr...@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.
Re: [protobuf] [ANN] Beefcake - A sane Ruby ProtoBuf library
Added to the wiki, thanks for contributing! On Sat, Jan 22, 2011 at 12:46 PM, blake.mizer...@gmail.com wrote: I'm please to give the Ruby developers here Beefcake. https://github.com/bmizerany/beefcake/tree/master/lib/beefcake I would appreciate it if someone would list this on the ThirdPartyAddon page of the protobuf wiki. Feeback is also appreciated. -blake -- 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.comprotobuf%2bunsubscr...@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.
Re: [protobuf] Building Protobuffers under linux
I think if -lprotobuf wasn't found, the linker would complain about that first, rather than complain about undefined references -- unless you have some other libprotobuf in your library path which is being taken instead. Maybe an older version? On Wed, Jan 19, 2011 at 10:29 AM, Jalitt jal...@gmail.com wrote: I am trying to build google protocol buffers in linux, and then link it into a build. for configure options, I am passing in --prefix=SOME_LOCAL_DIRECTORY make, make check, and make install all work just fine, and the library files are chilling in SOME_LOCAL_DIRECTORY. Elsewhere, I have a crazy folder heirarchy //one_folder/another/ and_another/CompileDirectory/ I copy the built protocol buffers library files from SOME_LOCAL_DIRECTORY and move them to /CompileDirectory/libs /CompileDirectory/includes has the include files In the makefile in CompileDirectory, I specific /CompileDirectory/libs for linking, and -lprotobuf Everything builds just fine, but during linking, I get a billion undefined reference errors. Clearly it is not linking properly with the library file. I went into the libs directory and nm libprotobuf.a and I see the symbols are properly published. Anyone have any ideas why its not properly linking libprotobuf.a? Is it a ./configfure option I am missing? -- 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.comprotobuf%2bunsubscr...@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.
Re: [protobuf] Problem with accents in python while unpacking a message
When using non-ASCII characters, make sure you are using the unicode type, not str, to avoid any ambiguity in character encoding. Also, I vaguely remember a bug fix related to this that is in version 2.4.0, so you might try that. On Thu, Jan 20, 2011 at 10:39 AM, Louhike louh...@gmail.com wrote: Hi, I'm using Google Protobuf with python on a project. My problem is I get an error while my program tries to build an instance with the function google.protobuf.text_format.merge() if the message contains accents (“utf-8 can't decode the byte \xe9” with the character 'é' for example). I need to keep the accents but I don’t find a solution to do it. It may seem simple but I’m in an early learning phase of programming and I'm often stuck on little things like that. Any help would be useful. Thanks, Louhike -- 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.comprotobuf%2bunsubscr...@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.
Re: [protobuf] ProtocolBuffers and existing classes
Have you looked at http://code.google.com/p/protostuff? It allows you to skip all the code generation and simply use your existing classes (support for cyclic references too) On Tue, Jan 25, 2011 at 10:39 PM, Marco@worldcorp mmistr...@gmail.comwrote: Hello i was wondering if protobuffer supports having an already existing class embedded in the message. What i mean: from example i have seen, use writes a .proto buffer and protobuffer generates all related java classes. However, i have already existing classe which i'd like to embed in a .proto file. Is that supported? I guess if protobuffer generates interfaces, i can get away with it and 'rewrite' my code .. but if it has the functionality to use existing classes, that would be appreciated any constraints on existing classes? i guess they all have to implement Serializable thanks and regarsd marco -- 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.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- When the cat is away, the mouse is alone. - David Yu -- 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.
[protobuf] Re: protobuf not handling special characters between Java server and C++ client
Thanks for pointing that out Evans. The Java protocol buffer API encodes strings as UTF-8. Since C++ has no unicode support, what you get on the other end is the raw UTF-8 encoded data. I was of the opinion that UTF8 encoding encodes each character using 8 bits or a byte. So not sure as to why the raw encoded data represents the character using 2 bytes instead of one. Also if on the Java end, if on the stream writer, I add something like: writer.write(new String(msg.getBytes(), UTF8).getBytes()) instead of simply writer.write(msg.getBytes()), I see the characters as expected on the C++ client. However this I believe messes up with the protobuf headers, so on C++ I receive only a partial file upto the entry that contains one such character. encoded data. You'll need to use some Unicode API to process it in whatever way your application requires. I suggest ICU: Trying this out now. Will post an update shortly. Thanks for the prompt response. -- 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.
[protobuf] Re: protobuf not handling special characters between Java server and C++ client
I was of the opinion that UTF8 encoding encodes each character using 8 bits or a byte. My understanding of UTF8 was clearly wrong. Just did some reading again, it encodes characters in bytes, and can use upto 4 bytes to represent a character. if on the stream writer, I add something like: writer.write(new String(msg.getBytes(), UTF8).getBytes()) instead of simply writer.write(msg.getBytes()), I see the characters as expected on the C++ client. However this I believe messes up with the protobuf headers, so on C++ I receive only a partial file upto the entry that contains one such character. Still not sure on the above though. -- 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.
Re: [protobuf] Re: protobuf not handling special characters between Java server and C++ client
On Tue, Jan 25, 2011 at 8:57 PM, Hitesh Jethwani hjethwa...@gmail.comwrote: if on the stream writer, I add something like: writer.write(new String(msg.getBytes(), UTF8).getBytes()) instead of simply writer.write(msg.getBytes()), I see the characters as expected on the C++ client. However this I believe messes up with the protobuf headers, so on C++ I receive only a partial file upto the entry that contains one such character. Still not sure on the above though. The reason this appears to work is because String.getBytes() encodes in ISO-8859-1 encoding by default. This encoding represents each character as exactly one byte, and can only represent character codes U+ through U+00FF. Since you are decoding the bytes as UTF-8 and then encoding them as ISO-8859-1, and since the character 'É' happens to be within the ISO-8859-1 range, you effectively decoded this character into a single byte. On the C++ side, the protobuf library does not verify that the parsed bytes are actually valid UTF-8 (except in debug mode); it just passes them through. So the string you see there includes the 'É' character as one byte. However, you end up getting a parser error because the length of the string (in bytes) ends up being different from the length given in the encoded message. The length was originally computed with 'É' represented as two bytes, but now it is only one byte, so the length is wrong. In general, decoding arbitrary bytes (like a protobuf) as if they were UTF-8 will lose information, so converting bytes - UTF-8 - bytes will corrupt the bytes. -- 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.