Re: how to enable ttf support in php 5.2.9
| From: | Michael A. Peters | Date: | Tue, 05 May 2009 23:22:05 +0000 |
| Subject: | Re: how to enable ttf support in php 5.2.9 | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-292319@lists.php.net to get a copy of this message | ||
Ashley Sheridan wrote:
Is that something you would suggest be used in any web app that has a textarea for input?content coming from MS Office clipboard pastes generally contain characters that are encoded wrong, and do not display correctly in web pages unless they have very relaxed doctypes. The function I generally use is: function removeMSCrap($crap) { $find = Array(chr(128), chr(133), chr(8226), chr(145), chr(8217), chr(146), chr(8220), chr(147), chr(8221), chr(148), chr(8226), chr(149), chr(8211), chr(150), chr(8212), chr(151), chr(8282), chr(153), chr(169), chr(174)); $replace = Array("€", "…", "″", "'", "'", "'", "'", """, """, """, """, "•", "•", "–", "–", "—", "—", "™", "™", "©", "®"); $roses = str_replace($find, $replace, $crap); return $roses; }