{ "hex_code":"\\xa5" } #### \xa5 #### //https://stackoverflow.com/questions/4209104/decoding-hex-string-in-javascript String.prototype.decodeEscapeSequence = function() { return this.replace(/\\x([0-9A-Fa-f]{4})/g, function() { return String.fromCharCode(parseInt(arguments[1], 16)); }); }; #### sub unescape { my( $str ) = @_; $str =~ s!\\x\{([0-9a-f]{4})\}!chr(hex $1)!ge; $str }; #### var hex_code = '\xa5';