aleitner commented on code in PR #395:
URL: https://github.com/apache/guacamole-server/pull/395#discussion_r990498794


##########
src/common/clipboard.c:
##########
@@ -154,13 +155,20 @@ void guac_common_clipboard_append(guac_common_clipboard* 
clipboard, const char*
     if (remaining < length)
         length = remaining;
 
+    char output_data[length];
+    memset(output_data, '\0', length);
+    char* output = output_data;
+
+    /* Convert clipboard contents */
+    guac_iconv(GUAC_READ_UTF8_NORMALIZED, &data, length,
+               GUAC_WRITE_UTF8, &output, length);
+
     /* Append to buffer */
-    memcpy(clipboard->buffer + clipboard->length, data, length);
+    memcpy(clipboard->buffer + clipboard->length, output_data, length);

Review Comment:
   Ahh that's true, moved to terminal



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to