Issues with tidy and utf-8 encoding

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

 



Hi list,

this is my first post and I've only been lurking around these premises
for the past week.

I've been running into some strange issues with tidy.

When I try and output my HTML in utf-8 all the accentuated characters
come out as total gobbledeegook.

I've have no issues echoing a string via utf8_encode(), the browser
picks up the right encoding and everything comes out fine.

The only workaround I've found so far is this :

$tidy = new tidy;
$tidy->parseString(utf8_encode($html), $config, 'utf8');
$tidy->cleanRepair();

echo $tidy;

Which is really dodgy if you ask me.

Has anyone run into the same kind of problem before?

I've set a meta tag as follows, but that seems to be modified by tidy on
the fly if ever the used encoding differs from the one indicated in the
meta tag.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Any help would be greatly appreciated.

Cheers,

Youri

-- 
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