[Kc] return vs newline
JYOUNG79 at kc.rr.com
JYOUNG79 at kc.rr.com
Thu Dec 7 13:17:35 PST 2006
Hi Andy,
Thanks so much for taking the time to help with this. Your code is
working much better than mine but some strange stuff is going on with
my text file:
I made a new file and typed out the first chunk manually (so it would
have the correct newline characters at the end of each line) and then I
pasted the next 2 chunks in from my original file like so:
===============================================
Wednesday, December 6, 2006 4:58:05 AM
===============================================
Job File: 12-06_05;57;45 AM_test.txt
--
Name: Jay Young
Dept: PSD
===============================================
Wednesday, December 6, 2006 4:58:05 AM
===============================================
Job File: 12-06_05;57;45 AM_test.txt
--
Name: Jay Young
Dept: PSD
===============================================
Wednesday, December 6, 2006 4:58:05 AM
===============================================
Job File: 12-06_05;57;45 AM_test.txt
--
Name: Jay Young
Dept: PSD
I then opened
this new file up in pico and found this:
===============================================
Wednesday, December 6, 2006 4:58:05 AM
===============================================
Job File: 12-06_05;57;45 AM_test.txt
--
Name: Jay Young
Dept: PSD
===============================================^MWednesday, December 6,
2006 4:58:05 AM^M===============================================^MJob
File: 12-06_05;57;45 AM_test.txt^M--^MName: Jay Young^MDept: PSD^M^M===
============================================^MWednesday, December 6,
2006 4:58:05 AM^M===============================================^MJob
File: 12-06_05;57;45 AM_test.txt^M--^MName: Jay Young^MDept: PSD
So it looks like my file is getting messed up somewhere! This file is
getting created on another mac by an Applescript using the "return"
character (ASCII number 13). Seems it's messing things up for me
though. Is there a way to change those ^M characters to \n and then
loop thru each line? These files can get huge thou
gh so I don't know of a good way about this. Thanks again Andy for
your incredible help!
djgoku, thanks for your replies too! They're much appreciated!
Jay
More information about the kc
mailing list