You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/runtime_strings.js
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -191,12 +191,16 @@ function lengthBytesUTF8(str) {
191
191
for(vari=0;i<str.length;++i){
192
192
// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
193
193
// See http://unicode.org/faq/utf_bom.html#utf16-3
194
-
varu=str.charCodeAt(i);// possibly a lead surrogate
0 commit comments