emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: x-clipboard-yank doesn't decode utf-8 string]


From: Kenichi Handa
Subject: Re: address@hidden: x-clipboard-yank doesn't decode utf-8 string]
Date: Fri, 10 Jun 2005 10:53:22 +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>, Richard Stallman <address@hidden> writes:
> ------- Start of forwarded message -------
> Date: Thu, 9 Jun 2005 00:57:06 +0800
> From: Zhang Wei <address@hidden>
> To: address@hidden
> Subject: x-clipboard-yank doesn't decode utf-8 string
[...]
> When I select some text from Mozilla-firefox using left mouse
> button, but without issuing cut/copy command explicitly, then I paste
> in emacs with middle mouse button or C-y, everything is OK,
> which means the X PRIMARY selection method works fine.

> But if I issue cut/copy command explicitly after
> selection (select Edit/copy from Mozilla-firefox's menu, or C-c),
> and then paste in emacs using Edit/paste menu item, what I got is
> undecoded utf string, something like this "\u60a8\u4e0a\u6b21",
> it seems that the X CLIPBOARD selection method does not work.

> The following patch could fix this problem, but I'm not sure if
> it is the best way.

> - 
> ------------------------------------------------------------------------------
> *** x-win.el    2005-05-30 02:44:48.000000000 +0800
> - --- x-win.el.new        2005-06-08 23:38:30.330605432 +0800
> ***************
> *** 2446,2452 ****
>     (interactive)

>     (let ((clipboard-text
>          (condition-case nil
> !            (x-get-selection 'CLIPBOARD)
>            (error nil)))
>         (x-select-enable-clipboard t))
>       (if (and clipboard-text (> (length clipboard-text) 0))
> - --- 2446,2452 ----
>     (interactive)
>     (let ((clipboard-text
>          (condition-case nil
> !            (x-selection-value 'CLIPBOARD)
>            (error nil)))
>         (x-select-enable-clipboard t))
>       (if (and clipboard-text (> (length clipboard-text) 0))
> - ------------------------------------------------------------------------

Thank you for the report.  As it seems that the patch is
correct, I've just installed it.

But, the above is a change to x-clipboard-yank and it seems
that this function was introduced on 21 Jan 2004 (strangely
that fact is not in ChangeLog).  At that time
x-selection-value was already there.  That means there will
be some reason for x-clipboard-yank not using
x-selection-value.  Does anybody know who wrote it?  If you
are the author, could you please confirm that the change
doesn't break your intention?

---
Kenichi Handa
address@hidden




reply via email to

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