Skip to content

Commit

Permalink
in_tail: Accept more variants for specifying UTF-16s
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Oct 9, 2024
1 parent 4c76014 commit de9fadd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/in_tail/tail_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@ struct flb_tail_config *flb_tail_config_create(struct flb_input_instance *ins,
if (strcasecmp(tmp, "auto") == 0) {
ctx->preferred_input_encoding = FLB_SIMDUTF_ENCODING_TYPE_UNICODE_AUTO;
}
else if (strcasecmp(tmp, "utf-16le") == 0) {
else if (strcasecmp(tmp, "utf-16le") == 0 ||
strcasecmp(tmp, "utf16-le") == 0) {
ctx->preferred_input_encoding = FLB_SIMDUTF_ENCODING_TYPE_UTF16_LE;
}
else if (strcasecmp(tmp, "utf-16be") == 0) {
else if (strcasecmp(tmp, "utf-16be") == 0 ||
strcasecmp(tmp, "utf16-be") == 0) {
ctx->preferred_input_encoding = FLB_SIMDUTF_ENCODING_TYPE_UTF16_BE;
}
else {
Expand Down

0 comments on commit de9fadd

Please sign in to comment.