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.

https://mathiasbynens.be/notes/javascript-encoding


Comments

Popular posts from this blog

Java 3D LWJGL collision -

methods - python can't use function in submodule -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -