diff -urN qt-2.3.0.orig/src/kernel/qclipboard_x11.cpp qt-2.3.0/src/kernel/qclipboard_x11.cpp
--- qt-2.3.0.orig/src/kernel/qclipboard_x11.cpp	Tue Mar  6 03:09:35 2001
+++ qt-2.3.0/src/kernel/qclipboard_x11.cpp	Fri Mar  9 18:10:40 2001
@@ -349,6 +349,26 @@
 	    
 	    XFree( (char*)data );
 	}
+
+	// see if we read multibyte text data
+	static Atom xa_compound = *qt_xdnd_str_to_atom( "COMPOUND_TEXT" );
+	if (*format == 8 && *type == xa_compound) {
+	    XTextProperty textprop;
+	    textprop.encoding = *type;
+	    textprop.format = *format;
+	    textprop.nitems = offset;
+	    textprop.value = (unsigned char *) buffer->data();
+
+	    char **list_ret = 0;
+	    int count;
+	    if (XmbTextPropertyToTextList(dpy, &textprop, &list_ret, &count)
+		== Success && count && list_ret) {
+		offset = strlen(list_ret[0]);
+		buffer->resize(offset + (nullterm ? 1 : 0));
+		memcpy(buffer->data(), list_ret[0], offset);
+	    }
+	    if (list_ret) XFreeStringList(list_ret);
+	}
 	
 	// zero-terminate (for text)
        	if (nullterm)
@@ -519,6 +539,9 @@
 	    QByteArray data;
 	    static Atom xa_targets = *qt_xdnd_str_to_atom( "TARGETS" );
 	    static Atom xa_multiple = *qt_xdnd_str_to_atom( "MULTIPLE" );
+	    static Atom xa_utf8 = *qt_xdnd_str_to_atom( "UTF8_STRING" );
+	    static Atom xa_compound = *qt_xdnd_str_to_atom( "COMPOUND_TEXT" );
+	    static Atom xa_text = *qt_xdnd_str_to_atom( "TEXT" );
 	    struct AtomPair { Atom target; Atom property; } *multi = 0;
 	    int nmulti = 0;
 	    int imulti = -1;
@@ -554,7 +577,7 @@
 		    while (d->source()->format(atoms)) atoms++;
 		    if (d->source()->provides("image/ppm")) atoms++;
 		    if (d->source()->provides("image/pbm")) atoms++;
-		    if (d->source()->provides("text/plain")) atoms++;
+		    if (d->source()->provides("text/plain")) atoms+=3;
 
 #ifdef QT_CLIPBOARD_DEBUG
 		    qDebug("qclipboard_x11.cpp:%d: %d provided types", __LINE__, atoms);
@@ -582,8 +605,11 @@
 			atarget[n++] = XA_PIXMAP;
 		    if ( d->source()->provides("image/pbm") )
 			atarget[n++] = XA_BITMAP;
-		    if ( d->source()->provides("text/plain") )
+		    if ( d->source()->provides("text/plain") ) {
+			atarget[n++] = xa_utf8;
+			atarget[n++] = xa_compound;
 			atarget[n++] = XA_STRING;
+		    }
 
 #ifdef QT_CLIPBOARD_DEBUG
 		    for (int index = 0; index < n; index++) {
@@ -605,6 +631,32 @@
 		    bool already_done = FALSE;
 		    if ( target == XA_STRING) {
 			fmt = "text/plain";
+		    } else if ( target == xa_compound || target == xa_text) {
+			fmt = "COMPOUND_TEXT";
+			data = d->source()->encodedData(fmt);
+			char *list[] = { data.data() };
+			XICCEncodingStyle style;
+			if (target == xa_compound) {
+			    style = XCompoundTextStyle;
+			} else {
+			    style = XStdICCTextStyle;
+			}
+
+			XTextProperty textprop;
+			if (XmbTextListToTextProperty(dpy, list, 1, style,
+						    &textprop) == Success) {
+			    data.duplicate((const char *) textprop.value,
+					    textprop.nitems);
+			    XFree(textprop.value);
+			    XChangeProperty(dpy, req->requestor, property,
+                                            xa_compound,
+					    8, PropModeReplace,
+					    (unsigned char *) data.data(),
+					    data.size());
+			    evt.xselection.property = property;
+			    already_done = TRUE;
+			}
+
 		    } else if ( target == XA_PIXMAP ) {
 			fmt = "image/ppm";
 			data = d->source()->encodedData(fmt);
@@ -706,6 +758,47 @@
     // TODO: record these once
     static Atom xa_targets = *qt_xdnd_str_to_atom( "TARGETS" );
     QByteArray targets = getDataInFormat(xa_targets);
+
+    Atom* target = (Atom*)targets.data();
+    int natoms = targets.size()/sizeof(Atom);
+
+    static Atom xa_utf8 = *qt_xdnd_str_to_atom( "UTF8_STRING" );
+    static Atom xa_compound = *qt_xdnd_str_to_atom( "COMPOUND_TEXT" );
+    static Atom xa_text = *qt_xdnd_str_to_atom( "TEXT" );
+
+    int n_utf8 = -1;
+    int n_compound = -1;
+    int dn = 0;
+    for (int i = 0; i < natoms; i++) {
+	if (target[i] == xa_utf8) {
+	    n_utf8 = i;
+	    dn++;
+	}
+	if (target[i] == xa_compound) {
+	    n_compound = i;
+	    dn++;
+	}
+    }
+    if (dn > 0) {
+	int maxn = (n_utf8 > n_compound) ? n_utf8 : n_compound;
+	int minn = (n_utf8 < n_compound) ? n_utf8 : n_compound;
+	for (int i = 0; i < maxn; i++) {
+	    if (target[i] == XA_STRING || target[i] == xa_text ||
+		target[i] == xa_compound) {
+		int k = 1;
+		for (int j = maxn; j > i + (dn - 1); j--) {
+		    if (j-k == minn) {
+			k++;
+		    }
+		    target[j] = target[j-k];
+		}
+		if (n_utf8 >= 0) target[i++] = xa_utf8;
+		if (n_compound >= 0) target[i++] = xa_compound;
+		break;
+	    }
+	}
+    }
+
     if ( targets.size()/sizeof(Atom) > (uint)n ) {
 	Atom* target = (Atom*)targets.data();
 	if ( *target == XA_PIXMAP )
diff -urN qt-2.3.0.orig/src/kernel/qdragobject.cpp qt-2.3.0/src/kernel/qdragobject.cpp
--- qt-2.3.0.orig/src/kernel/qdragobject.cpp	Tue Mar  6 03:09:35 2001
+++ qt-2.3.0/src/kernel/qdragobject.cpp	Fri Mar  9 18:10:40 2001
@@ -669,6 +669,10 @@
 	    // Don't include NUL in size (QCString::resize() adds NUL)
 	    ((QByteArray&)r).resize(r.length());
 	}
+    } else if ( 0==qstricmp(mime,"UTF8_STRING") ) {
+	r = d->txt.utf8();
+    } else if ( 0==qstricmp(mime,"COMPOUND_TEXT") ) {
+	r = d->txt.local8Bit();
     }
     return r;
 }
@@ -732,6 +736,24 @@
 			return TRUE;
 		    }
 		}
+	    }
+	} else if ( 0==qstricmp(mime,"UTF8_STRING")) {
+	    QByteArray payload;
+	    payload = e->encodedData(mime);
+	    // qDebug("QTextDrag::decode(): UTF8_STRING %d", payload.size());
+	    if ( payload.size() ) {
+		str = QString::fromUtf8(payload, payload.size());
+		subtype = "plain;charset=UTF-8";
+		return TRUE;
+	    }
+	} else if ( 0==qstricmp(mime,"COMPOUND_TEXT")) {
+	    QByteArray payload;
+	    payload = e->encodedData(mime);
+	    // qDebug("QTextDrag::decode(): COMPOUND_TEXT %d", payload.size());
+	    if ( payload.size() ) {
+		str = QString::fromLocal8Bit(payload, payload.size());
+		subtype = "plain";
+		return TRUE;
 	    }
 	}
     }
