[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coding system conversion error (was Re: abort in x_handle_selection_even

From: Jan D.
Subject: Coding system conversion error (was Re: abort in x_handle_selection_event when copying text)
Date: Mon, 07 Feb 2005 22:17:36 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Reiner Steib wrote:

When doing this, another problem appeared.  I was copying the content
of the *Messages* buffer using M-w (`kill-ring-save') in the current
CVS Emacs.  Then I yanked (`C-y') it in the mail buffer of this Emacs
session (Emacs 21.3).

At this moment, CVS Emacs aborted, see this backtrace:

This is easy for me to reproduce, start emacs-21.3, and emacs-cvs.
In emacs-cvs:
C-h i C-x h M-w
In emacs-21.3, right click.

Apparently it is not enought with a small set of text, it must be large enough to trigger trigger this error (1025 characters, 1024 is ok).

Emacs cvs crashes in the xassert in xselect.c, lisp_data_to_selection_data:
 else if (STRINGP (obj))
     xassert (! STRING_MULTIBYTE (obj));
     if (NILP (type))
   type = QSTRING;
     *format_ret = 8;
     *size_ret = SBYTES (obj);

The problem seems to be that xselect-convert-to-string in select.el returns a multibyte string when coding is compount-text-with-extensions in this call:

      ((eq type 'COMPOUND_TEXT)
       (setq str (encode-coding-string str coding)))

Most applications except Emacs apparently don't request COMPOUND_TEXT, for example UTF8_STRING works ok.

I don't know enough of these coding systems, can anybody with insight here help?


   Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]