Problem with ReadList[]
- To: mathgroup at smc.vnet.net
- Subject: [mg5211] Problem with ReadList[]
- From: hamusk at uncc.edu (hamusk at uncc.edu)
- Date: Fri, 15 Nov 1996 03:22:34 -0500
- Organization: UNCC
- Sender: owner-wri-mathgroup at wolfram.com
When reading in data from a file like this; data=ReadList["data",Table[Byte,{100}]]; to create a 100x100 array (from a 10000 byte long file), I find that if Mathematica encounters the value 26 (0x1A) it chokes and treats the value 26 and all values after it as 'End of File' . Also there is a problem in that it seems to sometimes add bytes that do not exist in the file. For instance once this happened: I loaded a file and did ?data I got back 104 98 29 53 5 53 90 97 5 57 27 When I looked directly (hex editor) at the data, the first row of bytes was 104 98 29 53 90 97 5 57 27 Very strange! For some reason, Mathematica added the values 5 and 53. I imagine that there is some sort of character translation going on but I cannot find anything about it in the documentation or on the Wolfram Research website. Also it would seem strange that it would be doing some sort of character translation, but who knows? I am running Mathhematica 2.2.1 for Students on Windows 95 (4.00.950). I do not encounter this problem on Solaris. Can anyone help? Is there a FAQ? Andy Musk