diff --git a/site/source/docs/api_reference/preamble.js.rst b/site/source/docs/api_reference/preamble.js.rst
index 10b4ac090577e..ac43159ec277d 100644
--- a/site/source/docs/api_reference/preamble.js.rst
+++ b/site/source/docs/api_reference/preamble.js.rst
@@ -234,7 +234,7 @@ Conversion functions — strings, pointers and arrays
 
 .. js:function:: intArrayFromString(stringy, dontAddNull[, length])
 
-  This converts a JavaScript string into a C-line array of numbers, 0-terminated.
+  This converts a JavaScript string into a C-line array of numbers, 0-terminated, encoded as UTF-8.
 
   :param stringy: The string to be converted.
   :type stringy: String
@@ -246,7 +246,7 @@ Conversion functions — strings, pointers and arrays
 
 .. js:function:: intArrayToString(array)
 
-  This creates a JavaScript string from a zero-terminated C-line array of numbers.
+  This creates a JavaScript string from an optionally zero-terminated C-line array of numbers, interpreted as UTF-8.
 
   :param array: The array to convert.
   :returns: A ``String``, containing the content of ``array``.
diff --git a/src/arrayUtils.js b/src/arrayUtils.js
index d8940dea944ef..cecf7c64c4552 100644
--- a/src/arrayUtils.js
+++ b/src/arrayUtils.js
@@ -13,16 +13,5 @@ function intArrayFromString(stringy, dontAddNull, length) {
 }
 
 function intArrayToString(array) {
-  var ret = [];
-  for (var i = 0; i < array.length; i++) {
-    var chr = array[i];
-    if (chr > 0xFF) {
-      if (ASSERTIONS) {
-        assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ')  at offset ' + i + ' not in 0x00-0xFF.');
-      }
-      chr &= 0xFF;
-    }
-    ret.push(String.fromCharCode(chr));
-  }
-  return ret.join('');
+  return UTF8ArrayToString(array, 0, array.length);
 }