...

View Full Version : How to read byte values from file?



pbb
05-28-2005, 04:39 PM
Can anybody tell me how to read byte values from binary files?
I have gotten quite far by using


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?

Willy Duitt
05-28-2005, 06:21 PM
http://www.webdeveloper.com/forum/showthread.php?t=67701



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum