chars: look at bytes in their context, so only valid sequences are accepted

This fixes https://savannah.gnu.org/bugs/?48125.

(The fix is slightly wasteful; speeding things up will follow later.)
1 file changed