Subject: Re: garbled unicode characters in M-x term

From: Chong Yidong <[email-masked]>
Date: Wed, 24 Sep 2008 16:30:25 -0400

> Ok, I think I found the problem. term uses `binary' as input coding.
> After it has examined the input, it inserts the relevant/visible parts
> of it into the buffer. Only at this point it decodes the bytes with
> the apropriate coding (variable:locale-coding-system).  At some point
> it splits the input string, to make it suitable for the with of the
> `terminal'. The problem is, that it measures bytes not characters. So
> the 3-byte character in question in aptitude, which is mostly on the
> last column, gets split in 2 strings a 1 and 2 byte. This 2 strings,
> when encoded and inserted independently, will result in what was
> described as the problem.

Thanks for the analysis.  Could you try to write a patch to fix this?