Skip to content

Commit 8d3c436

Browse files
authored
in_tail: add description of bug in encoding option (#585)
Signed-off-by: Daijiro Fukuda <[email protected]>
1 parent 56626bd commit 8d3c436

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

input/tail.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ You can get the list of supported encodings with this command:
231231
$ ruby -e 'p Encoding.name_list.sort'
232232
```
233233

234+
{% hint style='danger' %}
235+
Caution: From v0.14.12 to v1.18.x, there was a bug.
236+
237+
* You need to specify both `encoding` and `from_encoding`.
238+
* If you specify only `encoding`, `String#encode` will be executed unintentionally. **It can break the data.**
239+
* 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`.
240+
{% endhint %}
241+
234242
### `read_lines_limit`
235243

236244
| type | default | version |

0 commit comments

Comments
 (0)