I reckon you'll be needing a Java CFX then.
Seemed like a fun 5 minute project so here ya go.
-
import com.allaire.cfx.*;
import java.io.*;
public class cfReadTxtFile implements CustomTag{
public void processRequest( Request request, Response response )
throws Exc
IMHO this little square making trouble might be an ASCII null character.
A null character is a byte with 0 value. Although it is a standard character in the ASCII code,
CF will treat it as an end of string. That would explain why your text gets truncated.
So you might check if indeed there are null
o1956
~~
> -Original Message-
> From: Stephenie Hamilton [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, October 01, 2003 9:19 AM
> To: CF-Talk
> Subject: parsing txt file - seems unparsable
>
> I am trying to use CFFILE to
s we reach EOF, jBRobj.readLine() returns null (expected)
and variable 'line' is no longer defined, quite handy in this case.
-Original Message-----
From: Craig Dudley
Sent: 02 October 2003 13:30
To: CF-Talk
Subject: RE: parsing txt file - seems unparsable
This might help.
This might help.
action="">
action="">
line = " ";
while ( len(line) ){
line = jBRobj.readLine();
writeoutput(line & "#chr(13)#");
}
jBRobj.close();
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: 01 October 2003 19:19
To: CF-Talk
Subject: Re:pa
I've run into this before. CF is actually opening the file correctly,
but there's a null character, and CF uses null terminated strings, so it
sees that and thinks the string is done.
At least, that's my best guess.
I've never found a way to fix this in CF, unfortunately.
--Ben
Stephenie Ham
if you output the content of the file in your cf template (prior to db
insert) does it display the whole thing? If so, are you using
cfqueryparam?
> I am trying to use CFFILE to parse a text file, put the
> contents in a
> var and then insert that into a db.
> However, the file only gets parsed h
I am trying to use CFFILE to parse a text file, put the contents in a
var and then insert that into a db.
However, the file only gets parsed halfway through the first line. I
couldn't at first figure out why it would stop. If I opened the file
in notepad, added a space, then deleted the space, the
8 matches
Mail list logo