summaryrefslogtreecommitdiffstats
path: root/common/rfb/SConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/SConnection.cxx')
-rw-r--r--common/rfb/SConnection.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index 1cc330d8..46f0a850 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -306,7 +306,7 @@ void SConnection::clientCutText(const char* str)
strFree(clientClipboard);
clientClipboard = NULL;
- clientClipboard = strDup(str);
+ clientClipboard = latin1ToUTF8(str);
handleClipboardAnnounce(true);
}
@@ -450,7 +450,9 @@ void SConnection::announceClipboard(bool available)
void SConnection::sendClipboardData(const char* data)
{
- writer()->writeServerCutText(data);
+ CharArray latin1(utf8ToLatin1(data));
+
+ writer()->writeServerCutText(latin1.buf);
}
void SConnection::writeFakeColourMap(void)