Lines Matching refs:utf16buf
2876 var utf16buf = new Array(len*2);
2881 if (c < 0x80) { utf16buf[out++] = c; continue; } field
2885 if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } field
2896 if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } field
2899 utf16buf[out++] = c; field
2902 utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
2903 utf16buf[out++] = 0xdc00 | (c & 0x3ff);
2908 if (utf16buf.length !== out) {
2909 if(utf16buf.subarray) {
2910 utf16buf = utf16buf.subarray(0, out);
2912 utf16buf.length = out;
2917 return utils.applyFromCharCode(utf16buf);
5649 var utf16buf = new Array(len * 2);
5654 if (c < 0x80) { utf16buf[out++] = c; continue; } field
5658 if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } field
5669 if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } field
5672 utf16buf[out++] = c; field
5675 utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
5676 utf16buf[out++] = 0xdc00 | (c & 0x3ff);
5680 return buf2binstring(utf16buf, out);