Hi every body ,

it's my first topic in this forum,

how can I change tidy charset , I use windows-1256
and when I try to run this script

if(extension_loaded('tidy')) {
		$config = array(
           'indent'         => true,
           'output-xhtml'   => true,
           'wrap'           => 200);

		$tidy = new tidy;
		$tidy->parseString($source, $config, 'windows-1256');
		$tidy->cleanRepair();        
		return  $tidy;
    }

this error appear
Warning: tidy:[IMG]http://www.sitepoint.com/forums/images/smilies/smiles2/tongue.gif[/IMG]arseString() [function.parseString]: Could not set encoding 'windows-1256' in C:\AppServ\www\cook\site_config.php on line 35

and when I try to run this code

if(extension_loaded('tidy')) {
		$config = array(
           'indent'         => true,
           'output-xhtml'   => true,
           'wrap'           => 200);

		$tidy = new tidy;
		$tidy->parseString($source, $config, 'utf8');		$tidy->cleanRepair();        
		return  $tidy;
    }

no body can read the page, blah blah

what I have to do ??

Perhaps try windows1256. I noticed utf8 didn't have a hyphen. Not having used tidy myself I can't be sure though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.