add UTF8 support for clipboard
This commit is contained in:
parent
2f1e11b54a
commit
92a20cfb84
|
|
@ -490,9 +490,9 @@ export default class RFB extends EventTargetMixin {
|
|||
this._clipboardText = text;
|
||||
RFB.messages.extendedClipboardNotify(this._sock, [extendedClipboardFormatText]);
|
||||
} else {
|
||||
text = encodeUTF8(text);
|
||||
let data = new Uint8Array(text.length);
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
// FIXME: text can have values outside of Latin1/Uint8
|
||||
data[i] = text.charCodeAt(i);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue