Node.js examples for String:Unicode
String from UTF8 Byte Array
if (typeof String.prototype.fromUTF8ByteArray != 'function') String.fromUTF8ByteArray = function(arr, offset, length) { var str = ""; if (typeof(offset) == "undefined") {//from w w w .jav a2 s .c o m offset = 0; length = arr.length; } for (var i=offset; i<length; i++) str += String.fromCharCode(arr[i]); return String.utf8Decode(str); };