From 6c19efb8f38df033830581b068ec2c5939667b3e Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Tue, 10 Jun 2025 17:05:01 +0900 Subject: [PATCH] in_tail: add description of bug in encoding option Signed-off-by: Daijiro Fukuda --- input/tail.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/input/tail.md b/input/tail.md index ddf27898..4faf7285 100644 --- a/input/tail.md +++ b/input/tail.md @@ -231,6 +231,14 @@ You can get the list of supported encodings with this command: $ ruby -e 'p Encoding.name_list.sort' ``` +{% hint style='danger' %} +Caution: From v0.14.12 to v1.18.x, there was a bug. + +* You need to specify both `encoding` and `from_encoding`. +* If you specify only `encoding`, `String#encode` will be executed unintentionally. **It can break the data.** +* To change only the encoding info as metadata, without transforming the string data itself (`String#force_encoding`), you need to specify the same encoding for both `encoding` and `from_encoding`. +{% endhint %} + ### `read_lines_limit` | type | default | version |