Normal Topic Replacing LF with CRLF (Read 696 times)
BWETTLAUFER
Full Member
***
Offline



Posts: 216
Location: Cambridge, Ontario
Joined: Apr 9th, 2010
Replacing LF with CRLF
Jan 3rd, 2014 at 6:34pm
Print Post Print Post  
Hey all,

I have a client that is giving me files with erratic line-end coding.  How would I use FileOpen to prep a file by replacing all LF (which is @chr(10) I believe) with CRLF (@chr(13)+@chr(10))?

I've tried to do it with @replace going through line by line, but it doesn't seem to work, so it looks like I need to prep the whole file at once ...
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Replacing LF with CRLF
Reply #1 - Jan 6th, 2014 at 2:12pm
Print Post Print Post  
Hello Blair,

You can use @Insert() to pull in the entire file at once and then use @Replace() and then FileOverWrite() to write it back out.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged