Re: how to enable ttf support in php 5.2.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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("€", "…", "″", "'", "'",
"'", "'", """, """, """, """, "•",
"•", "–", "–", "—", "—", "™", "™",
"©", "®");
	
	$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?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux