]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Added a wrapper for the UTF-8 decoding.
authorsamhed <samuel@cendio.se>
Fri, 14 Mar 2014 14:18:05 +0000 (15:18 +0100)
committersamhed <samuel@cendio.se>
Fri, 14 Mar 2014 14:18:05 +0000 (15:18 +0100)
include/rfb.js
include/util.js

index 9dad36aa6bf213de878b8e38376c469fb85e782e..173f6997f9f6a7d31cfee214030203d5367fac6b 100644 (file)
@@ -923,7 +923,7 @@ init_msg = function() {
 
         /* Connection name/title */
         name_length   = ws.rQshift32();
-        fb_name = decodeURIComponent(escape(ws.rQshiftStr(name_length)));
+        fb_name = Util.decodeUTF8(ws.rQshiftStr(name_length));
         conf.onDesktopName(that, fb_name);
         
         if (conf.true_color && fb_name === "Intel(r) AMT KVM")
index 8893591c440b8daf9930eaf1c59eadabdee3bb92..1c02676c070b590c8d05bef1b6db559daecc3594 100644 (file)
@@ -202,6 +202,14 @@ Util.conf_defaults = function(cfg, api, defaults, arr) {
     }
 };
 
+/*
+ * Decode from UTF-8
+ */
+Util.decodeUTF8 = function(utf8string) {
+    return decodeURIComponent(escape(utf8string));
+}
+
+
 
 /*
  * Cross-browser routines