function hex2char(hex) {
  if (!hex) {
    return '';
  }
  var result = '';
  var n = parseInt(hex, 16);
  if (n <= 0xFFFF) {
    result += String.fromCharCode(n);
  } else if (n <= 0x10FFFF) {
    n -= 0x10000;
    result +=
        (String.fromCharCode(0xD800 | (n >> 10)) +
         String.fromCharCode(0xDC00 | (n & 0x3FF)));
  } else {
    console.error('hex2Char error: Code point out of range :' + hex);
  }
  return result;
}
/**
 * Converts a single hex number to a character.
 * @param {string} hex Hexadecimal string.
 * @return {string} Unicode values of hexadecimal string.
 */
Converts a single hex number to a character.
@param {string} hex Hexadecimal string.
@return {string} Unicode values of hexadecimal string.
Converts a single hex number to a character . @param { string } hex Hexadecimal string . @return { string } Unicode values of hexadecimal string .
function hex2char(hex) {
  if (!hex) {
    return '';
  }
  var result = '';
  var n = parseInt(hex, 16);
  if (n <= 0xFFFF) {
    result += String.fromCharCode(n);
  } else if (n <= 0x10FFFF) {
    n -= 0x10000;
    result +=
        (String.fromCharCode(0xD800 | (n >> 10)) +
         String.fromCharCode(0xDC00 | (n & 0x3FF)));
  } else {
    console.error('hex2Char error: Code point out of range :' + hex);
  }
  return result;
}
function hex2char ( hex ) { if ( ! hex ) { return '' ; } var result = '' ; var n = parseInt ( hex , 16 ) ; if ( n <= 0xFFFF ) { result += String . fromCharCode ( n ) ; } else if ( n <= 0x10FFFF ) { n -= 0x10000 ; result += ( String . fromCharCode ( 0xD800 | ( n >> 10 ) ) + String . fromCharCode ( 0xDC00 | ( n & 0x3FF ) ) ) ; } else { console . error ( 'hex2Char error: Code point out of range :' + hex ) ; } return result ; }
Converts a single hex number to a character.
Converts a single hex number to a character .