here is a fix.

-- 
Alexander Polakov | http://rootshell.be/~polachok/
diff -ur xclip/xclib.c xclip-utf8/xclib.c
--- xclip/xclib.c	2001-12-17 09:14:40.000000000 +0300
+++ xclip-utf8/xclib.c	2008-05-16 09:18:48.151261743 +0400
@@ -101,6 +101,7 @@
 {
 	/* a property for other windows to put their selection into */
 	Atom pty, inc, pty_type;
+	Atom utf8_string;
 	int pty_format;
 		
 	/* buffer for XGetWindowProperty to dump data into */
@@ -111,6 +112,7 @@
 	unsigned char *ltxt;
 
 	pty = XInternAtom(dpy, "XCLIP_OUT", False);
+	utf8_string = XInternAtom(dpy, "UTF8_STRING", False);
 
 	switch (*context)
 	{
@@ -127,7 +129,7 @@
 			XConvertSelection(
 				dpy,
 				sel,
-				XA_STRING,
+				utf8_string,
 				pty,
 				win,
 				CurrentTime
@@ -354,6 +356,7 @@
 					 */
 	XEvent		res;		/* response to event */
 	Atom		inc;
+	Atom            utf8_string =  XInternAtom(dpy, "UTF8_STRING", False);
 
 	switch (*context)
 	{
@@ -404,7 +407,7 @@
 					dpy,
 					*win,
 					*pty,
-					XA_STRING,
+					utf8_string,
 					8,
 					PropModeReplace,
 					(unsigned char*) txt,
@@ -485,7 +488,7 @@
 					dpy,
 					*win,
 					*pty,
-					XA_STRING,
+					utf8_string,
 					8,
 					PropModeReplace,
 					&txt[*pos],

Reply via email to