diff --git a/core/codecString.js b/core/codecString.js index 1a8a396f..79e4a49d 100644 --- a/core/codecString.js +++ b/core/codecString.js @@ -4,7 +4,7 @@ * @author Mike Hamburg * @author Dan Boneh */ - + /** * UTF-8 strings * @namespace @@ -17,12 +17,12 @@ sjcl.codec.utf8String = { if ((i&3) === 0) { tmp = arr[i/4]; } - out += String.fromCharCode(tmp >>> 24); + out += String.fromCharCode(tmp >>> 8 >>> 8 >>> 8); tmp <<= 8; } return decodeURIComponent(escape(out)); }, - + /** Convert from a UTF-8 string to a bitArray. */ toBits: function (str) { str = unescape(encodeURIComponent(str));