In article <[EMAIL PROTECTED]>, Richard Stallman <[EMAIL PROTECTED]> writes:
> ------- Start of forwarded message -------
> Date: Thu, 9 Jun 2005 00:57:06 +0800
> From: Zhang Wei <[EMAIL PROTECTED]>
> To: emacs-pretest-bug@gnu.org
> 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
[EMAIL PROTECTED]


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to