src/basis/utils/utf16.js
function toUTF8(input){
    var output = '';
    var len = input.length;

    for (var i = 0; i < len; i++)
    {
      var c = input.charCodeAt(i);

      if (c < 128)
        output += chars[c];
      else
        if (c < 2048)
          output += chars[(c >> 6) | 192] +
                    chars[(c & 63) | 128];
        else
          output += chars[(c >> 12) | 224] +
                    chars[((c >> 6) & 63) | 128] +
                    chars[(c & 63) | 128];
    }
    return output;
  }
function toUTF8(input){
    var output = '';
    var len = input.length;

    for (var i = 0; i < len; i++)
    {
      var c = input.charCodeAt(i);

      if (c < 128)
        output += chars[c];
      else
        if (c < 2048)
          output += chars[(c >> 6) | 192] +
                    chars[(c & 63) | 128];
        else
          output += chars[(c >> 12) | 224] +
                    chars[((c >> 6) & 63) | 128] +
                    chars[(c & 63) | 128];
    }
    return output;
  }
function toUTF8 ( input ) { var output = '' ; var len = input . length ; for ( var i = 0 ; i < len ; i ++ ) { var c = input . charCodeAt ( i ) ; if ( c < 128 ) output += chars [ c ] ; else if ( c < 2048 ) output += chars [ ( c >> 6 ) | 192 ] + chars [ ( c & 63 ) | 128 ] ; else output += chars [ ( c >> 12 ) | 224 ] + chars [ ( ( c >> 6 ) & 63 ) | 128 ] + chars [ ( c & 63 ) | 128 ] ; } return output ; }
utf16 string -> utf8 string
utf16 string - > utf8 string