yida / msgpack-matlab

MessagePack for Matlab
Apache License 2.0
8 stars 7 forks source link

Move to msgpack-c 1.1+ -- support BIN & EXT types. #3

Closed randallpittman closed 5 years ago

randallpittman commented 5 years ago

The msgpack-c API in version 1.0 switched to the new MessagePack spec (c.f. old spec). Migration information is at the bottom of the main wiki page for msgpack-c.

randallpittman commented 5 years ago

New spec indicates that STR type objects are UTF-8 strings. Existing unpack implementation uses mxCreateString, but this is problematic b/c as of R2017b documentation only ASCII is supported for the string argument. Not sure if this was the case prior to 2017b.

Also, the current implementation has to copy the string to a buffer just to add a null terminator for use with mxCreateString.

I think moving forward the approach should be to go back to making a uint8 array and then using mexFunctionmexCallMATLAB to convert to utf-8 with native2unicode.

randallpittman commented 5 years ago

With many thanks to your project, I've decided to fork and go in my own direction to support the current MessagePack standard (randallpittman/msgpack-matlab2).