[Top][All Lists]
[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: |
Stefan Monnier |
Subject: |
Re: Emacs puts binary junk into the clipboard, marking it as text |
Date: |
Tue, 19 Sep 2006 06:54:34 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> 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.
Also IIRC a perfectly valid utf-8 buffer may contain eight-bit-* chars, use
to keep track of valid unicode chars that have no corresponding character in
emacs-mule. So the presence of eight-bit-* chars does not imply that the
utf-8 encoded form of the text will contain an invalid utf-8 byte sequence.
> 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.
That sounds terribly fragile/buggy.
Stefan
- Re: Emacs puts binary junk into the clipboard, marking it as text, Jan Djärv, 2006/09/15
- Message not available
- Re: Emacs puts binary junk into the clipboard, marking it as text, Jan D., 2006/09/16
- Re: Emacs puts binary junk into the clipboard, marking it as text, Jan D., 2006/09/16
- Re: Emacs puts binary junk into the clipboard, marking it as text, Kenichi Handa, 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text, Jan Djärv, 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text, Kenichi Handa, 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text,
Stefan Monnier <=
- Re: Emacs puts binary junk into the clipboard, marking it as text, Kenichi Handa, 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text, Stefan Monnier, 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text, Jan D., 2006/09/19
- Re: Emacs puts binary junk into the clipboard, marking it as text, Kenichi Handa, 2006/09/19