diff --git a/core/rfb.js b/core/rfb.js index 4b3526f9..ab11961c 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -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); }