mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

This is a convenience function to make it easier to print literal byte sequences to stdout without additional escaping like what may be added by the default `print` statement behavior. For example, related to GH-596, `print` currently escapes even valid UTF-8 byte sequences and makes it difficult to output valid JSON strings containing such.
12 lines
257 B
Text
12 lines
257 B
Text
# @TEST-EXEC: zeek -b %INPUT >out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
local j = to_json("\x07\xd4\xb7o");
|
|
|
|
local v: vector of count = vector();
|
|
v += 9;
|
|
v += 10;
|
|
|
|
print_raw(j, "\n");
|
|
print_raw("start ", j, 137, T, v, " finish", "\n");
|
|
print_raw("\xc3\xa9", "\n");
|