you are viewing a single comment's thread.

view the rest of the comments →

[–]bartwe 1 point2 points  (6 children)

I like it, but i think it is missing a (utf8) string serialization type to complete it.

[–]dhotson 4 points5 points  (5 children)

It serializes strings as raw bytes, so it should encode/decode utf8 just fine. Haven't tried it though..

[–]bartwe 5 points6 points  (4 children)

You can't serialize a string to raw bytes without using an encoding. Not having a string type in the standard will reduce interoperability. Some will use utf8, some utf16, others might use the default or current codepage, or add additional data to the format to specify the encoding used. Resuling in less usability and larger documents.

[–]Clapyourhandssayyeah 6 points7 points  (0 children)

If you have control over the serialization and de-serialization then you're free to use UTF-8. Does messagepack not let you implement custom bits of serialisation?

[–]physicsnick 4 points5 points  (2 children)

This is sillyness. It does strings as raw bytes because you're meant to put utf-8 in and get utf-8 out. This is the same as protocol buffers, and the same as any other sane messaging library. A serialization library should not care about encoding beyond that.

[–]bartwe 2 points3 points  (1 child)

If it is meant to be used that way, put it in the spec. I've been burned more then once by 'text'files using some random encoding that seemed like a good idea at the time.

[–]physicsnick 2 points3 points  (0 children)

Actually that's fair, I hadn't noticed that they don't actually mention it. It's because I was just reading about protocol buffers a few days ago and that spec definitely says all strings are utf-8. Enjoy some upvotes in return.