mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Added optional script and redef bool to enable utf-8 in ASCII logs
This commit is contained in:
parent
6927dd1213
commit
66557d3178
10 changed files with 111 additions and 2 deletions
|
@ -54,6 +54,7 @@ public:
|
|||
void SetFlush(int arg_do_flush) { do_flush = arg_do_flush; }
|
||||
|
||||
void EnableEscaping();
|
||||
void EnableUTF8();
|
||||
void AddEscapeSequence(const char* s) { escape_sequences.insert(s); }
|
||||
void AddEscapeSequence(const char* s, size_t n)
|
||||
{ escape_sequences.insert(string(s, n)); }
|
||||
|
@ -185,6 +186,7 @@ protected:
|
|||
unsigned int offset; // where we are in the buffer
|
||||
unsigned int size; // size of buffer in bytes
|
||||
|
||||
bool utf8; //whether to allow non ascii utf-8 characters to pass through
|
||||
bool escape; // escape unprintable characters in output?
|
||||
typedef set<string> escape_set;
|
||||
escape_set escape_sequences; // additional sequences of chars to escape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue