Jump to content

[SOLVED] strange text formatting


jpratt

Recommended Posts

I am connecting to an email account, reading its contents and placing it in a database. everything looks good but some of the text comes formated strange. some of it looks like this:

 

I use the fine-cut nozzles on my Hyperthreme 1250. I am having the same pro=

blem on=20

 

As you can see it cuts off sentences midword, places an = sign, and end of sentences it places and =20. Does anyone know what causes this? I tried a few different string functions on it to clear it up, but nothing helped. Can someone give me an idea what is going on? Thanks.

Link to comment
Share on other sites

I found the reason. Some of the emails were coming in as quoted printable strings. There are two functions that decode this.

 

http://uk2.php.net/manual/en/function.quoted-printable-decode.php

 

and if using the imap module for email:

 

http://uk2.php.net/manual/en/function.imap-qprint.php

 

I use the imap module to get my email so I will probably just work that into my class. Thanks for all the suggestions.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.