Remove Line feeds

Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 12:30 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 12:32 pm

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

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Remove Line feeds

Postby Enrico Maria Giordano » Wed May 02, 2018 1:03 pm

Can you send me the text file to test here?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 1:08 pm

Here is a link to the file.

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

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Remove Line feeds

Postby Enrico Maria Giordano » Wed May 02, 2018 1:55 pm

I can't see any CRLF or LF in that file.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 2:08 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Remove Line feeds

Postby Enrico Maria Giordano » Wed May 02, 2018 3:27 pm

Can you send me the txt file, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 3:32 pm

Sent to your email
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Remove Line feeds

Postby Enrico Maria Giordano » Wed May 02, 2018 4:39 pm

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
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Remove Line feeds

Postby Jeff Barnes » Wed May 02, 2018 4:48 pm

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests