Skip to content
Snippets Groups Projects
Commit a0d06970 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

box: don't use zero-width space in fselect

Currently, the zero-width space Unicode character is silently ignored by
the YAML encoder but with commit https://github.com/tarantool/libyaml/commit/351108e1ffd5c6296349fa9ab87f91ef8a84c4e7
("Allow to emit invalid utf-8 scalar strings"), it will print it as
a unicode code point, as it should. The fselect helper uses this
character to prevent the YAML encoder from quoting the output string.
Actually, quoting is triggered by usage of spaces and vertical bars.
We already replace spaces with NBSP (U+00A0). Let's also replace
vertical bars with Latin Letter Dental Click (U+01C0). It looks the
same but has no special meaning to YAML.

In the master branch this issue was fixed by removing the use_nbsp
option of fselect completely and using multi-line strings instead,
see commit f76d3c69 ("box: make fselect return a multi-line string
instead of a table"). We can't do that in 2.11 because there the
yaml_pretty_multiline compat option is disabled by default and without
it multi-line strings look ugly in YAML.

Needed for #8756

NO_DOC=no user-visible changes
NO_CHANGELOG=no user-visible changes
parent 65835ffe
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment