emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Emacs puts binary junk into the clipboard, marking it as text


From: Kenichi Handa
Subject: Re: Emacs puts binary junk into the clipboard, marking it as text
Date: Tue, 19 Sep 2006 14:05:40 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, "Jan D." <address@hidden> writes:

> I've checked in a fix that changes UTF8_STRING to STRING if the data 
> doesn't look like UTF8.  However, this might give errors too.  The only 
> way to be sure to copy raw binary data correctly is by adding a new type 
> (like application-specific/octet-stream).   But if we do that, nobody 
> will be able to get data from Emacs, as such a type is not standard and 
> unsupported.  Copy-paste with raw binary data is just something most 
> apps don't do.

AFAIK, only when TEXT is requested, an selection owner can
choose the returning type from STRING, COMPOUND_TEXT, or
UTF8_STRING.  When UTF8_STRING is requested, we should
return it or return nothing.

And, if Emacs owns a unibyte string, perhaps the right thing
is to make it multibyte according to the current
lang. env. (by string-make-multibyte) at first, then encode
it by utf-8.

---
Kenichi Handa
address@hidden




reply via email to

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