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
https://forums.phpfreaks.com/topic/161100-solved-strange-text-formatting/
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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.