[FX.php List] Extra content at the end of the document
Tim 'Webko' Booth
tim at nicheit.com.au
Tue Oct 28 15:43:33 MDT 2008
On 29/10/2008, at 6:49 AM, Steve Winter wrote:
> Valid conclusion, suspect incorrectly encoded characters in the
> field with the largest amount of data probably generated by someone
> doing a copy and paste from word...
Yep, I'd support that - smart quotes and the like have caused me a lot
of problems over time. You can set the database to not use them, but
pasting in stuff from Word seems to get around that.
Try running the output through a replace function to strip them... Off
the top of my head, something like
function convert_smart_quotes($string)
{
$search = array(chr(145),
chr(146),
chr(147),
chr(148);
$replace = array("'",
"'",
'"',
'"');
return str_replace($search, $replace, $string);
}
Cheers
Webko
More information about the FX.php_List
mailing list