Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    pbb
    pbb is offline
    New to the CF scene
    Join Date
    May 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to read byte values from file?

    Can anybody tell me how to read byte values from binary files?
    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?

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •