mike-jumper commented on code in PR #999:
URL: https://github.com/apache/guacamole-client/pull/999#discussion_r2324326169


##########
guacamole-common-js/src/main/webapp/modules/Keyboard.js:
##########
@@ -892,6 +892,11 @@ Guacamole.Keyboard = function Keyboard(element) {
 
             // Determine keysym of current character
             var codepoint = str.codePointAt ? str.codePointAt(i) : 
str.charCodeAt(i);
+
+            // For surrogate pairs, skip the second 16 bits.
+            if (str.charCodeAt(i) != codepoint) {

Review Comment:
   This comparison should use `!==` (same elsewhere).



##########
guacamole-common-js/src/main/webapp/modules/StringWriter.js:
##########
@@ -161,7 +161,12 @@ Guacamole.StringWriter = function(stream) {
 
         // Fill buffer with UTF-8
         for (var i=0; i<text.length; i++) {
-            var codepoint = text.charCodeAt(i);
+            var codepoint = text.codePointAt ? text.codePointAt(i) : 
text.charCodeAt(i);;

Review Comment:
   Beware you accidentally added an extra semicolon here (null statement).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to