Roger,
We are sending a file to a web page that cannot have the end of file character (hex 1A).
We are using fwrite() and fclose(). Is there a way (method) to save this file without that character in Alaska, or any method to strip it off?
Fred Henck
Omni
End ofFile Character
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: End ofFile Character
I will have to check but I thought that memowrit() did this but the fxxxxx functions did not. Had came across this with the xml functions in express++.
Not completely certain without some testing.
Cliff.
Not completely certain without some testing.
Cliff.
Re: End ofFile Character
Oh, I thought it was the other way around. Let me try the memowrite. I think I remember that also.
Thanks, Cliff
Fred
Thanks, Cliff
Fred
Re: End ofFile Character
Hi,
'memowrit' will add that character. Normally you wont have it when you use fwrite.
This is my function which i use for years.
'memowrit' will add that character. Normally you wont have it when you use fwrite.
This is my function which i use for years.
Code: Select all
function abomemowrite(cTargetFile,cBuffer)
******************************************
Local nTarget := FCreate( cTargetFile, FC_NORMAL )
if nTarget == -1
return .F.
else
FWrite( nTarget, cBuffer)
FClose(ntarget)
endif
return .T.
Re: End ofFile Character
FWrite() does not add an EOF character.
I suspect that the EOF character is in the buffer text that you are writing.
I suspect that the EOF character is in the buffer text that you are writing.
The eXpress train is coming - and it has more cars.
Re: End ofFile Character
Verified and memowrit, which is used for our log routine and other situations, just updates info in a file, and never has an eof character, at least not the way we do it.
We do a memoread, then write the memoread plus what is to be added. On our error logs, it never ends I think we got this straight from Rogers error routine years ago.
Fred
We do a memoread, then write the memoread plus what is to be added. On our error logs, it never ends I think we got this straight from Rogers error routine years ago.
Fred
Re: End ofFile Character
Sorry, I was wrong. The fwrite is the one that does not have the eof character.
Re: End ofFile Character
Hi,
That was what I thought.
It's the reason I made my abomemowrit() function once.
That was what I thought.
It's the reason I made my abomemowrit() function once.