GNU bug report logs - #25288
25.1; term, ansi-term, broken output of utf8 text

Previous Next

Package: emacs;

Reported by: Vjacheslav <fvamail <at> gmail.com>

Date: Wed, 28 Dec 2016 16:58:02 UTC

Severity: normal

Tags: confirmed, fixed, patch

Found in versions 24.5, 25.1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #18 received at 25288 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25288 <at> debbugs.gnu.org, fvamail <at> gmail.com
Subject: Re: bug#25288: 25.1; term, ansi-term, broken output of utf8 text
Date: Wed, 28 Dec 2016 21:37:19 -0500
[Message part 1 (text/plain, inline)]
tags 25288 patch
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: npostavs <at> users.sourceforge.net
>> Date: Wed, 28 Dec 2016 14:10:30 -0500
>> Cc: 25288 <at> debbugs.gnu.org
>> 
>> Is there a way to recognize incomplete decoding from lisp?  I can't see
>> any.
>
> If you know the encoding of the byte stream (and term.el must, since
> it evidently decodes it later on), then you could probably use
> char-charset, after decoding: if you get 'eight-bit, then you've got
> incomplete byte sequence.  But I didn't try that.

That should work at least for encodings like utf-8 for which undecoded
bytes are not ascii.  I guess parsing of escape codes would only work on
such encodings anyway, so it should be fine.  Patch attached.

[v1-0001-Handle-multibyte-chars-spanning-chunks-in-term.el.patch (text/plain, attachment)]

This bug report was last modified 8 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.