An error occurred while fetching folder content.
Vladimir Davydov
authored
One may encode a non-printable string under the MsgPack type MP_STR. In fact, there's no way to encode binary data as MP_BIN from Lua so users often do that, which breaks our gdb extension. Let's encode a string in base64 if unicode() raises an error, like we do with MP_BIN. While we are at it, - escape double quotes in printable strings; - fix MP_BIN encoding (b64encode takes and returns bytes). - don't use YAML !!binary prefix before base64 data - use bin: and str: instead. Here's what it looks like: ``` (gdb) p *box_tuple_last <...> data = ["\"тест\\foo\"", str:/w==, bin:/w==]} ``` The tuple was created with the following command: ``` tarantool> msgpack = require('msgpack') --- ... tarantool> box.tuple.new( > msgpack.object_from_raw('\xae"тест\\foo"'), -- MP_STR unicode > msgpack.object_from_raw('\xa1\xff'), -- MP_STR binary > msgpack.object_from_raw('\xc4\x01\xff')) -- MP_BIN --- - ['"тест\foo"', !!binary /w==, !!binary /w==] ... ``` Follow-up commit 08a171a4 ("gdb: support unicode in MP_STR type of MsgPack"). NO_DOC=gdb extension NO_TEST=gdb extension NO_CHANGELOG=gdb extension
Name | Last commit | Last update |
---|---|---|
.. |