detox icon indicating copy to clipboard operation
detox copied to clipboard

max_length filter chops UTF-8 chars

Open dharple opened this issue 4 years ago • 1 comments

The max_length filter does not respect multibyte characters.

dharple avatar Feb 18 '21 05:02 dharple

Reproduce with:

# ---------------------------------------------------------------------------

INPUT=$(printf "\u0201\u0202\u0203\u0204\u0205\u0206\u0207\u0208")
OUPTUT=$(printf "\u0201\u0202\u0203\u0204")
METHOD1=max-length-9

test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1"

dharple avatar Feb 18 '21 05:02 dharple