Remove Line feeds

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Remove Line feeds

Post by Jeff Barnes »

How can I remove line feeds from text?
I've tried cText = StrTran( cText, CRLF, CHR(13) )
Also tried cText = StrTRan( cText, CHR(10), "" )
but when I put the text in an Ascii checker (http://www.asciivalue.com/) it shill shows CHR 10

I've tried writing the file with MemoWrit() and FCreate()/Fwrite()

I'm stumped :(
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Remove Line feeds

Post by Jeff Barnes »

Forgot to mention, I need just a CR at the end of each line.
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Remove Line feeds

Post by Jeff Barnes »

Here is a link to the file.

www.can-soft.net/dlnew/sample.hl7
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Remove Line feeds

Post by Jeff Barnes »

What are you checking it with?
When I paste the text into http://www.asciivalue.com/ it shows both chr(13) and chr(10)
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Remove Line feeds

Post by Jeff Barnes »

Sent to your email
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Remove Line feeds

Post by Enrico Maria Giordano »

There is only one CR at the end of each line, no LFs. Please let me know where did you find a LF (at which offset) exactly.

EMG
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Remove Line feeds

Post by Jeff Barnes »

I think the issue is when I am looking at the file in notepad, ultraedit etc...
I ran some quick code to show me the values of each char and it only shows the CHR(13) at the end of the line and no CHR(10) so I think I'm good.
Thanks for looking into this with me.
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
Post Reply