Re: how to enable ttf support in php 5.2.9

From: Date: Wed, 06 May 2009 09:49:11 +0000
Subject: Re: how to enable ttf support in php 5.2.9
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-292329@lists.php.net to get a copy of this message
On Tue, 2009-05-05 at 16:22 -0700, Michael A. Peters wrote: > Ashley Sheridan wrote: > > >> > > 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("&euro;", "&#133;", "&#8243;", > > "&#039;", "&#039;", > > "&#039;", "&#039;", "&#034;", > > "&#034;", "&#034;", "&#034;", "&#149;", > > "&#149;", "&#150;", "&#150;", > > "&#151;", "&#151;", "&#153;", "&#153;", > > "&copy;", "&reg;"); > > > > $roses = str_replace($find, $replace, $crap); > > return $roses; > > } > > Is that something you would suggest be used in any web app that has a > textarea for input? > It is valid for that also. I've used it on standard <input type="text"/> tags before as well. Ash www.ashleysheridan.co.uk

« previous php.general (#292329) next »