src/basis/utils/utf16.js
function toUTF8Bytes(input){
    // utf16 -> utf8
    input = toUTF8(input);

    // string -> array of bytes
    var len = input.length;
    var output = new Array(len);

    for (var i = 0; i < len; i++)
      output[i] = input.charCodeAt(i);

    return output;
  }
function toUTF8Bytes(input){
    // utf16 -> utf8
    input = toUTF8(input);

    // string -> array of bytes
    var len = input.length;
    var output = new Array(len);

    for (var i = 0; i < len; i++)
      output[i] = input.charCodeAt(i);

    return output;
  }
function toUTF8Bytes ( input ) { // utf16 -> utf8 input = toUTF8 ( input ) ; // string -> array of bytes var len = input . length ; var output = new Array ( len ) ; for ( var i = 0 ; i < len ; i ++ ) output [ i ] = input . charCodeAt ( i ) ; return output ; }
utf16 string -> utf8 bytes array
utf16 string - > utf8 bytes array