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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thenewuser
    New Member
    • Nov 2006
    • 3

    "=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.
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    Hi friend

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

    Thansk
    Vssp

    Comment

    • thenewuser
      New Member
      • Nov 2006
      • 3

      #3
      Originally posted by vssp
      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: CATHESOMMERVILL E@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: CATHESOMMERVILL E@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.

      Comment

      • cassbiz
        New Member
        • Oct 2006
        • 202

        #4
        Can we see the code that generates the error?


        Originally posted by thenewuser
        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: CATHESOMMERVILL E@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: CATHESOMMERVILL E@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.

        Comment

        • cassbiz
          New Member
          • Oct 2006
          • 202

          #5
          You can try using 'rtrim'

          Here is a link that may help you http://us2.php.net/rtrim

          Comment

          Working...