This might help.

<cfobject type="JAVA" name="jFR" class="java.io.FileReader"
action=""> <cfset jFRobj = jFR.init('c:/somefile.txt')>

<cfobject type="JAVA" name="jBR" class="java.io.BufferedReader"
action=""> <cfset jBRobj = jBR.init(jFRobj)>

<pre>
<cfscript>
line = " ";
while ( len(line) ){
line = jBRobj.readLine();
writeoutput(line & "#chr(13)#");
}
jBRobj.close();
</cfscript>
</pre>

-----Original Message-----
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: 01 October 2003 19:19
To: CF-Talk
Subject: Re:parsing txt file - seems unparsable


Is this CF 5 or earlier?

If so, it is probably actually a NULL chr(0) character.

Notepad will get rid of it when you open and save the file.

CF 5 and earlier have trouble with strings containing NULLs,
since it uses NULLs to mark the end of strings (I think).

The data is still in the string, but all of the output string
functions stop at that character.

Solution? I don't have one. This is where Java and Custom Tags
come in handy.

Jerry Johnson

>>> [EMAIL PROTECTED] 10/01/03 02:08PM >>>
This sounds line an end -f line or carriage return character (or
both)

Do a replace of each [chr(10) & chr(13); replace with white
space or some marker for your illumination "~~~" or whatever ] in the
variable and see if that helps.

Are you SURE it's not in the database, as well? Just kicked down
a line?

>If i open the file in notepad, then save it (without making any

>changes) it works fine. hmmmm...wonder how/if i can use
cfexecute to
>have notepad open the file and then save it?
>other than that, i can't think of anything else...
>
>Steph

  _____  

[ Todays Threads

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to