[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: Kenichi Handa
Subject: Re: Emacs puts binary junk into the clipboard, marking it as text
Date: Tue, 19 Sep 2006 20:14:03 +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>, Stefan Monnier <address@hidden> writes:

> > 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.

Yes, but such eight-bit-* chars can be detected by checking
`untranslated-utf-8' property.

> > 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.

Then, what do you think Emacs should do in such a case?

Kenichi Handa

reply via email to

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