Yes my code substitutes the bytes with value 0 (zero) with the ascii code for space (that is 32 decimal, 0x20 hex). I've done this because I made a trial opening the file with notepad then saving it back. What I have found is that notepad translated each zero to space.
If this still doesn't work I don't really understand:
1) which translation is made by notepad
2) what kind of data you have
I consider that the file you have is not a text file definitely!
What I understand is that your file is a binary file containing a stream of short integer values (16 bits), where each record is delimited by a code which value is 65 ('A').
In this case try to treat it as a bynary file and read it sequentially:
f=fopen("Program Files/Serial Data Logger/LogData.txt","rb");
f=fopen("Program Files/Serial Data Logger/LogData.txt","rb");
if (!f)
return 1;
iLength = fread(s,1,1000,f);
fclose(f);
while(p <= iLength-1)
{
if (s[p] == 65) //if s[p] is equal to 65 or "A" then
data[d] = s[p+1] + s[p+2]*128;
........ etc.
Do you have any spec of the expected output file from the datalogger?