replacementSequence¶
Defines a byte sequence used to substitute invalid input bytes.
This parameter applies to mmutf8fix: Fix invalid UTF-8 Sequences.
- Name:
replacementSequence
- Scope:
input
- Type:
string
- Default:
not set
- Required?:
no
- Introduced:
8.2606.0
Description¶
This parameter configures a replacement byte sequence for each invalid
input byte detected by mmutf8fix. It is useful when a single printable
US-ASCII character is not enough, for example when operators want to use
the UTF-8 encoding of U+FFFD as the invalid-character marker.
replacementSequence and replacementChar are
mutually exclusive. Use replacementChar when a single-byte
replacement is sufficient. Use replacementSequence only when a
multi-byte marker is needed; it is an explicit opt-in to the rebuild path
because the output field can become longer than the original input.
Each invalid input byte is replaced independently. For example, if an
invalid two-byte sequence is detected and replacementSequence is set
to the UTF-8 bytes for U+FFFD, the output contains two replacement
markers.
Use octal byte escapes in object-parameter strings. For example, write the
UTF-8 bytes for U+FFFD as \357\277\275.
Input usage¶
module(load="mmutf8fix")
# U+FFFD encoded as UTF-8 bytes.
action(type="mmutf8fix" replacementSequence="\357\277\275")
YAML usage¶
modules:
- load: "mmutf8fix"
rulesets:
- name: main
script: |
action(type="mmutf8fix" replacementSequence="\357\277\275")
See also¶
See also mmutf8fix: Fix invalid UTF-8 Sequences.
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.