Code: Select all
nce’ to “your†comI know I can use str_replace() but I really don't want to test every possible invalid character inputed through word.
Thanks guys.
Moderator: General Moderators
Code: Select all
nce’ to “your†comCode: Select all
$value = str_replace ( array( '’','‘','“','”','…','©','®','™','—','–','%u2013',"\t",'%u2019' ), array( "'","'",'"','"','...','©','®','™','-','-','-',' ',"'" ), $value );
I was messing with the following, but I really don't want to play with Word anymore
Yeah Word does suck but when you are dealing with customers and 99.9% of them use Word you have no choice but to play nice.Kieran Huggins wrote:Word is the devil - avoid it at all costs! The characters it uses have always been a major headache.
Code: Select all
// will display “
header("Content-Type: text/plain; charset=cp1252");
echo "\xe2\x80\x9c";
Code: Select all
// will display “
header("Content-Type: text/plain; charset=utf8");
echo "\xe2\x80\x9c";
Code: Select all
// will also display “
header("Content-Type: text/plain; charset=cp1252");
echo "\x93";