[Bug]: Consuming raw bytes with CLI return incorrect data #3967
Labels
bug
Something isn't working
help wanted
Good issue for community involvement
no-issue-activity
no-stale
Opt-out of closing issue due to no activity
Steps to reproduce:
test.bin
with the following bytes0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0xF0, 0x90, 0x80, 0x57, 0x6F, 0x72, 0x6C, 0x64
. This is from https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy "Incorrect bytes" exampleIn the
test-output.bin
file, the bytes will be0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0xEF, 0xBF, 0xBD, 0x57, 0x6F, 0x72, 0x6C, 0x64, 0x0A
.0xF0, 0x90, 0x80
is replaced by0xEF, 0xBF, 0xBD
.I believe this happens to the inappropriate use of
from_utf8_lossy
influvio/crates/fluvio-cli/src/client/consume/record_format.rs
Line 77 in 29d1a11
This is binary data, it should not be parsed as utf8.
The text was updated successfully, but these errors were encountered: