RE: null characters in a file

2002-01-02 Thread Mark Stewart

Kelly,

We ran into this EXACT same problem about a month ago. We were doing a
cffile, then parsing through the file to modify it and then spitting
the modified version to screen. We discovered, as you did, that cf
chokes on null characters and were perplexed at what to do. In our
situation, we ended up modifying the file on the back-end, through perl,
when the file was placed in the directory (business rules state that the
file gets ftp'd from the main frame to a directory on the web server).
It made perfect sense to do any modifications on the back-end - why slow
down cf when you know that every time you get a file, you have to modify
it.

After the file was modified on the back-end, we were free to call the
file anyway we wanted. I.E. cffile, cfcontent, cflocation, etc.

Hope that helps.
Mark



-Original Message-
From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 31, 2001 11:28 PM
To: CF-Talk
Subject: null characters in a file


Using CFFILE to read a file. The file has a couple of null characters in
the
middle of the file.
When it reaches the NULL characters it assumes it has reached the end
and
stops. Is there
a way to read the file (I have to make some modifications to it as well)
and
get around 
or parse out the null characters?

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: null characters in a file

2002-01-02 Thread Kelly Matthews

That's what we are considering now using VB we aren't running perl on our
machine here and I would rather not hopefully VB can handle it. We are just
going ot have VB split the file in 2, CF will edit the one portion then VB
would put them batch together. Is Cold Fusion able to CALL a vb
script/executable? I am assuming it can just have never done that. Do you
know the best way to CALL something like that? Make it a COM Object? 
Kelly

-Original Message-
From: Mark Stewart [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 02, 2002 9:31 AM
To: CF-Talk
Subject: RE: null characters in a file


Kelly,

We ran into this EXACT same problem about a month ago. We were doing a
cffile, then parsing through the file to modify it and then spitting the
modified version to screen. We discovered, as you did, that cf chokes on
null characters and were perplexed at what to do. In our situation, we ended
up modifying the file on the back-end, through perl, when the file was
placed in the directory (business rules state that the file gets ftp'd from
the main frame to a directory on the web server). It made perfect sense to
do any modifications on the back-end - why slow down cf when you know that
every time you get a file, you have to modify it.

After the file was modified on the back-end, we were free to call the file
anyway we wanted. I.E. cffile, cfcontent, cflocation, etc.

Hope that helps.
Mark



-Original Message-
From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 31, 2001 11:28 PM
To: CF-Talk
Subject: null characters in a file


Using CFFILE to read a file. The file has a couple of null characters in the
middle of the file. When it reaches the NULL characters it assumes it has
reached the end and stops. Is there a way to read the file (I have to make
some modifications to it as well) and get around 
or parse out the null characters?


__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: null characters in a file

2002-01-02 Thread Mark Stewart

I've never called a vbscript before. I would assume that if you made it
an exe, that you could call it through cfexecute or, as you mentioned,
instantiate an object and call it that way.

Another reason we decided to modify files on the back-end instead of
on-the-fly was because some of our files were rather large (up to 2mb).
The size of the file, coupled with parsing, was wy to slow.

Mark



-Original Message-
From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 9:44 AM
To: CF-Talk
Subject: RE: null characters in a file


That's what we are considering now using VB we aren't running perl on
our
machine here and I would rather not hopefully VB can handle it. We are
just
going ot have VB split the file in 2, CF will edit the one portion then
VB
would put them batch together. Is Cold Fusion able to CALL a vb
script/executable? I am assuming it can just have never done that. Do
you
know the best way to CALL something like that? Make it a COM Object? 
Kelly

-Original Message-
From: Mark Stewart [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 02, 2002 9:31 AM
To: CF-Talk
Subject: RE: null characters in a file


Kelly,

We ran into this EXACT same problem about a month ago. We were doing a
cffile, then parsing through the file to modify it and then spitting
the
modified version to screen. We discovered, as you did, that cf chokes on
null characters and were perplexed at what to do. In our situation, we
ended
up modifying the file on the back-end, through perl, when the file was
placed in the directory (business rules state that the file gets ftp'd
from
the main frame to a directory on the web server). It made perfect sense
to
do any modifications on the back-end - why slow down cf when you know
that
every time you get a file, you have to modify it.

After the file was modified on the back-end, we were free to call the
file
anyway we wanted. I.E. cffile, cfcontent, cflocation, etc.

Hope that helps.
Mark



-Original Message-
From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 31, 2001 11:28 PM
To: CF-Talk
Subject: null characters in a file


Using CFFILE to read a file. The file has a couple of null characters in
the
middle of the file. When it reaches the NULL characters it assumes it
has
reached the end and stops. Is there a way to read the file (I have to
make
some modifications to it as well) and get around 
or parse out the null characters?



__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: null characters in a file

2002-01-01 Thread Andrew Scott

Not 100% sure but in CF5 isn't there a binary read, which you could then
convert to a string or am I assuming binary64 on this, anyone?


-Original Message-
From: Kelly Matthews [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 1 January 2002 3:28 PM
To: CF-Talk
Subject: null characters in a file

Using CFFILE to read a file. The file has a couple of null characters in
the
middle of the file.
When it reaches the NULL characters it assumes it has reached the end
and
stops. Is there
a way to read the file (I have to make some modifications to it as well)
and
get around 
or parse out the null characters?

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: null characters in a file

2002-01-01 Thread Sicular, Alexander

I heard of a similar problem. I met this guy at devcon who was using cf to
dynamicaly build images on the fly but when he got to a null on a string of
bits cf would balk. The solution escapes me atm. He was from the uk and if
he's reading this im sure he'll share his genius.

Good luck,

Alexander Sicular
Chief Technology Architect
Neurological Institute of New York
Columbia University
as867 [at] columbia {dot} edu


|-Original Message-
|From: Kelly Matthews [mailto:[EMAIL PROTECTED]] 
|Sent: Monday, December 31, 2001 11:28 PM
|To: CF-Talk
|Subject: null characters in a file
|
|
|Using CFFILE to read a file. The file has a couple of null 
|characters in the middle of the file. When it reaches the NULL 
|characters it assumes it has reached the end and stops. Is 
|there a way to read the file (I have to make some 
|modifications to it as well) and get around 
|or parse out the null characters? 
|
__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists