diff --git a/src/body/lossy.rs b/src/body/lossy.rs index 7bdd1bd3..0bc6e232 100644 --- a/src/body/lossy.rs +++ b/src/body/lossy.rs @@ -58,7 +58,7 @@ impl io::Read for LossyUtf8Reader { invalid_sequence, .. } => { - let valid_len = valid_prefix.as_bytes().len(); + let valid_len = valid_prefix.len(); let invalid_len = invalid_sequence.len(); // Switch out the problem input chars