Fix for pasting

This commit is contained in:
Andy Dixon
2026-06-02 10:47:31 +01:00
parent 759485fc47
commit 2eed4ea548
4 changed files with 63 additions and 21 deletions
+5 -1
View File
@@ -236,7 +236,11 @@ class RawViewer {
}
try {
const b64 = btoa(dataToSend);
// For hex/escaped, data is already raw bytes (0-255) so btoa is correct.
// For text mode, UTF-8 encode so non-ASCII characters are transmitted properly.
const b64 = (format === 'hex' || format === 'escaped')
? btoa(dataToSend)
: window.NexusTerminal.utf8ToBase64(dataToSend);
await window.go.api.Service.WriteSession(sessionId, b64);
input.value = '';