Erro convert Hex to Ascii Javascript -
i receive binary file (biometric template) , must convert hexadecimal caracter ascii caracter. hexadecimal caracter programm not convert, hex = 95.
what wrong? must program convert every ?
bellow code:
var campo = document.getelementbyid('fileinput'); var hex = campo.tostring(); var str = ''; (var = 0; < prm.length; += 2) str += string.fromcharcode(parseint(prm.substr(i, 2), 16));
you don't specify mean "do not convert". if meant decimal 95, there ascii character not printable (nak). there no ascii character hex 0x95 because ascii 7-bit encoding (0-0x7f). , javascript strings not ascii, they're ucs-2.
Comments
Post a Comment