diff --git a/pkg/asciisanitizer/sanitizer.go b/pkg/asciisanitizer/sanitizer.go index ee3b07b..e54811e 100644 --- a/pkg/asciisanitizer/sanitizer.go +++ b/pkg/asciisanitizer/sanitizer.go @@ -47,7 +47,7 @@ func (t *Sanitizer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err return } r, size := utf8.DecodeRune(src) - if r == utf8.RuneError { + if r == utf8.RuneError && size < 2 { if !atEOF { err = transform.ErrShortSrc return