You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use MsgPack for unpacking data that has been packed by some external partner (I think they use a PHP implementation of MsgPack).
The strings in the packets are encoded in ASCII (codepage 1252). Unpacking works in most cases but not when strings contain german Umlaute.
I implemented my own 'Unpacker' which is basically just a wrapper of the default unpacker that only overrides the ReadString(out string result) Method. Works for me, but is not very convenient. I would appreciate an easier possibility to support different encodings. E.g. if Unpacker.Create(..) would have an option to specify the encoding or if there were an implementation of AsciiUnpacker delivered with MsgPack.
Here is my implementation of AsciiUnpacker and a usage example:
var serializer = MessagePackSerializer.Get<MyType[]>(_context); Unpacker unpacker = new AsciiUnpacker(stream); MyType[] data = serializer.UnpackFrom(unpacker); AsciiUnpacker.txt
The text was updated successfully, but these errors were encountered:
We use MsgPack for unpacking data that has been packed by some external partner (I think they use a PHP implementation of MsgPack).
The strings in the packets are encoded in ASCII (codepage 1252). Unpacking works in most cases but not when strings contain german Umlaute.
I implemented my own 'Unpacker' which is basically just a wrapper of the default unpacker that only overrides the ReadString(out string result) Method. Works for me, but is not very convenient. I would appreciate an easier possibility to support different encodings. E.g. if Unpacker.Create(..) would have an option to specify the encoding or if there were an implementation of AsciiUnpacker delivered with MsgPack.
Here is my implementation of AsciiUnpacker and a usage example:
var serializer = MessagePackSerializer.Get<MyType[]>(_context); Unpacker unpacker = new AsciiUnpacker(stream); MyType[] data = serializer.UnpackFrom(unpacker);
AsciiUnpacker.txt
The text was updated successfully, but these errors were encountered: