471,578 Members | 1,262 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,578 software developers and data experts.

"=20" getting appended to each line of a text file when downloaded from a pop server.

Hi all,

I am working on windows 2000 and using php 5.0 and apache 2.0.59.
I am facing a problem while parsing a text file.Actually I am using a pop server for parsing an email.I am downloading new mails from that server using php and parsing the attachments.I want to parse text files as well. BUt when i save the attached .txt file on my machine, "=20" gets appended at the end of every line.

If the file is an xml file, sometimes "=90" gets appended. I can't figure out as why is this happening and how to rectify it.

waiting for your valuable replies,

thanks.
Nov 2 '06 #1
4 1559
vssp
268 100+
Hi friend

Sorry I am not clear what u wwant ? Plase can u explne the issue briefly

Thansk
Vssp
Nov 2 '06 #2
Hi friend

Sorry I am not clear what u wwant ? Plase can u explne the issue briefly

Thansk
Vssp
Hey, thanks for such a quick reply,

I am writing an api for e-mail parsing which extracts the mails from the email server and parses the attachments if any,and save the data from those attchments.in db.

Now when the attachment is a .txt file,and when i save it , "=20" gets automatically appended to each line.plz see below,

this is the original content of the text file which was attached to the mail(by myself for testing purpose).


Lead ID: 13343161
Name: CATHE SOMMERVILLE
Address: 1755 ORINDA COURT
THOUSAND OAKS, CA 91362
Home Phone: (805) 241-4032
Email: CATHESOMMERVILLE@YAHOO.COM
Best Contact Time: EVENING AT HOME
Home Owner: YES
Credit Rating: POOR
LTV: 1.000000
Loan Amount: $270,000.00
Purpose: REFINANCE
Property Value: $270,000.00
Property Type: CONDO
Mortgages Total: $270,000.00
Mortgage1 Bal: $270,000.00
Mortgage1 Rate: 4.000%


and now look at what it looks like when it is saved on the hard disk from the incoming mail.


Lead ID: 13343161=20
Name: CATHE SOMMERVILLE=20
Address: 1755 ORINDA COURT=20
THOUSAND OAKS, CA 91362=20
Home Phone: (805) 241-4032=20
Email: CATHESOMMERVILLE@YAHOO.COM=20
Best Contact Time: EVENING AT HOME=20
Home Owner: YES=20
Credit Rating: POOR=20
LTV: 1.000000=20
Loan Amount: $270,000.00=20
Purpose: REFINANCE=20
Property Value: $270,000.00=20
Property Type: CONDO=20
Mortgages Total: $270,000.00=20
Mortgage1 Bal: $270,000.00=20
Mortgage1 Rate: 4.000%=20


I don't know where this =20 is coming from and how to rectfy it.
Nov 2 '06 #3
cassbiz
202 100+
Can we see the code that generates the error?


Hey, thanks for such a quick reply,

I am writing an api for e-mail parsing which extracts the mails from the email server and parses the attachments if any,and save the data from those attchments.in db.

Now when the attachment is a .txt file,and when i save it , "=20" gets automatically appended to each line.plz see below,

this is the original content of the text file which was attached to the mail(by myself for testing purpose).


Lead ID: 13343161
Name: CATHE SOMMERVILLE
Address: 1755 ORINDA COURT
THOUSAND OAKS, CA 91362
Home Phone: (805) 241-4032
Email: CATHESOMMERVILLE@YAHOO.COM
Best Contact Time: EVENING AT HOME
Home Owner: YES
Credit Rating: POOR
LTV: 1.000000
Loan Amount: $270,000.00
Purpose: REFINANCE
Property Value: $270,000.00
Property Type: CONDO
Mortgages Total: $270,000.00
Mortgage1 Bal: $270,000.00
Mortgage1 Rate: 4.000%


and now look at what it looks like when it is saved on the hard disk from the incoming mail.


Lead ID: 13343161=20
Name: CATHE SOMMERVILLE=20
Address: 1755 ORINDA COURT=20
THOUSAND OAKS, CA 91362=20
Home Phone: (805) 241-4032=20
Email: CATHESOMMERVILLE@YAHOO.COM=20
Best Contact Time: EVENING AT HOME=20
Home Owner: YES=20
Credit Rating: POOR=20
LTV: 1.000000=20
Loan Amount: $270,000.00=20
Purpose: REFINANCE=20
Property Value: $270,000.00=20
Property Type: CONDO=20
Mortgages Total: $270,000.00=20
Mortgage1 Bal: $270,000.00=20
Mortgage1 Rate: 4.000%=20


I don't know where this =20 is coming from and how to rectfy it.
Nov 2 '06 #4
cassbiz
202 100+
You can try using 'rtrim'

Here is a link that may help you http://us2.php.net/rtrim
Nov 3 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Andrew | last post: by
7 posts views Thread by Stimp | last post: by
4 posts views Thread by stevong | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.