dexador
dexador copied to clipboard
unread-char for decoding-stream broken for multibyte encodings
In STREAM-READ-CHAR, the first value returned from the BABEL:CODE-POINT-COUNTER function was used to track LAST-CHAR-SIZE (the number of bytes consumed while reading a character). However, it is actually the number of characters decoded, and for this particular call, it is always 1. As a result, a later STREAM-UNREAD-CHAR of a multibyte character will cause BUFFER-POSITION to point into the middle of the encoded byte sequence, ultimately leading to a decoding error.
added a fix in https://github.com/fukamachi/dexador/pull/38