The "rfb_win32" library merged with VNC 4.1.1 code.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/merge-with-vnc-4.1.1@523 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfb_win32/Clipboard.cxx b/rfb_win32/Clipboard.cxx
index 867f885..a4c43f0 100644
--- a/rfb_win32/Clipboard.cxx
+++ b/rfb_win32/Clipboard.cxx
@@ -1,5 +1,5 @@
-/* Copyright (C) 2002-2004 RealVNC Ltd. All Rights Reserved.
- *
+/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
+ *
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -61,15 +61,16 @@
//
-// -=- ASCII filter (in-place)
+// -=- ISO-8859-1 (Latin 1) filter (in-place)
//
void
-removeNonAsciiChars(char* text) {
+removeNonISOLatin1Chars(char* text) {
int len = strlen(text);
int i=0, j=0;
for (; i<len; i++) {
- if ((text[i] >= 1) && (text[i] <= 127))
+ if (((text[i] >= 1) && (text[i] <= 127)) ||
+ ((text[i] >= 160) && (text[i] <= 255)))
text[j++] = text[i];
}
text[j] = 0;
@@ -126,7 +127,7 @@
} else {
CharArray unix_text;
unix_text.buf = dos2unix(clipdata);
- // removeNonAsciiChars(unix_text.buf);
+ removeNonISOLatin1Chars(unix_text.buf);
notifier->notifyClipboardChanged(unix_text.buf, strlen(unix_text.buf));
}
} else {
@@ -162,7 +163,7 @@
// - Pre-process the supplied clipboard text into DOS format
CharArray dos_text;
dos_text.buf = unix2dos(text);
- // removeNonAsciiChars(dos_text.buf);
+ removeNonISOLatin1Chars(dos_text.buf);
int dos_text_len = strlen(dos_text.buf);
// - Allocate global memory for the data