Subject: bug#6720: battle with x-clipboard vs. Chinese

From: David De La Harpe Golden <[email-masked]>
Date: Sun, 25 Jul 2010 04:31:57 +0100

On 25/07/10 02:08, [email-masked] wrote:

> All I know is starting with
>   $ apt-cache policy emacs-snapshot
>   emacs-snapshot:
>     Installed: 1:20100724-1
>     Candidate: 1:20100724-1

Yes, this appears to be Romain Francoise's snapshot packaging of latest 
emacs development code. Bug reports for development code are of course 
helpful and welcome, but please be aware that isn't an official release 
if you aren't already.

> I am having two kinds of pain:
>
> 1. Having to write things into /tmp/files to be able to read them into
> emacs correctly as xclip now can't if I want Chinese intact.
> I try every button and end up having to resort to /tmp.

Middle mouse button is currently known to be broken due to #6635., 
symptoms being strings like  "\u4e2d\u6587" or "ä¸­æ".

"M-x load-file" of the attached fix6635.el file in emacs will help 
there, until a fix goes into the tree.

"xclip": you mean the command line tool to manipulate the clipboard?

Using xclip to put text on the clipboard for C-y to pull in does seem to 
work as expected on my system:

# shell
$ echo "中文" | xclip -selection clipboard

# in emacs, C-y
中文

But I don't actually know chinese.  Do you have a sample string that is 
breaking if you do the above?