fearialtog
asked on
PHP Tidy - How to stop it changing non English characters
I am tidying up some old html files and storing parts of them in a mysql database. PHP tidy does a great job but it changes not English characters to their html equivalent. e.g. í becomes í etc. I know it is good html but I want the database to be clean text (utf8)
(I can easily convert it to html on the way back out)
I have tried to configure Tidy to use UTF8 encoding
$config = array( "char-encoding" => "utf8");
Alas to no avail.
Is it possible to get tidy to ignore these special characters?
(I can easily convert it to html on the way back out)
I have tried to configure Tidy to use UTF8 encoding
$config = array( "char-encoding" => "utf8");
Alas to no avail.
Is it possible to get tidy to ignore these special characters?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good answer thank you.The solution was simple.
Change
$config = array( "char-encoding" => "utf8");
to
$config = array( "output-encoding" => "utf8");
Change
$config = array( "char-encoding" => "utf8");
to
$config = array( "output-encoding" => "utf8");
ASKER
A simple solution but I could not see it. Great to have someone look at with it with fresh eyes.