Link to home
Start Free TrialLog in
Avatar of fearialtog
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?


ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fearialtog
fearialtog

ASKER

Thank you
A simple solution but I could not see it. Great to have someone look at with it with fresh eyes.
Good answer thank you.The solution was simple.
Change
$config = array( "char-encoding" => "utf8");
to
$config = array( "output-encoding" => "utf8");