I'm trying to read and write a binary file (fingerprint). The contents of binary files are below:
tL.|¢Tn>ªÏû•"q‚º†k‹ë²¶zño‰JÇ5»
I read this file with the following command:
var input, file, fr;
input = document.getElementById('fileinput');
file = input.files[0];
fr = new FileReader();
fr.onload = receivedBinary;
fr.readAsBinaryString(file);
function receivedBinary() {
showResult(fr, "Binary");
}
function showResult(fr, label) {
var result;
result = fr.result;
alert(result);
}
But it's happening a problem. When I see the file content that has been read, some characters are not loaded. The following file after read:
tL.|¢Tn>ªÏû"qºkë²¶zñoJÇ5»
For example, do you realize that the symbol "•", between characters û and " was not read.
Why? What should I do to read and write all the characters?