0

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

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by landae
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.