Skip to content

Commit

Permalink
Further increase performance of UTF8-decode()
Browse files Browse the repository at this point in the history
  • Loading branch information
migerh committed Sep 27, 2013
1 parent 124d94c commit 88c9b44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ define(['jxg'], function (JXG) {

if (state === UTF8_ACCEPT) {
if (codep > 0xffff) {
string.push(String.fromCharCode(0xD7C0 + (codep >> 10), 0xDC00 + (codep & 0x3FF)));
string.push(0xD7C0 + (codep >> 10), 0xDC00 + (codep & 0x3FF));
} else {
string.push(String.fromCharCode(codep));
string.push(codep);
}
}
}

return string.join('');
return String.fromCharCode.apply(null, string);
},

/**
Expand Down

0 comments on commit 88c9b44

Please sign in to comment.