Can anybody tell me how to read byte values from binary files?
I have gotten quite far by using
This works most of the time, but not for a few byte values! For example, byte value 128 (0x80) returns 8364 (0x20AC), 149 (0x95) returns 8226 (0x2022), etc. Does anybody know a proper way to read byte values from a file?
I have gotten quite far by using
Code:
var ts = file.OpenAsTextStream();
alert(ts.Read(1).charCodeAt(0));
This works most of the time, but not for a few byte values! For example, byte value 128 (0x80) returns 8364 (0x20AC), 149 (0x95) returns 8226 (0x2022), etc. Does anybody know a proper way to read byte values from a file?