Hi folks, I'm trying to crawl Arabic data using simple_html_dom, And I'm getting result like this If I use mb_convert_encoding function, I get the result, but source code like this Infect I need to insert it into database, so suggest me your valuable solution.
Are you sure everything is set for a proper character set encoding supporting those characters -- in terms of the editor and form used to create the data, any database used to store the data, AND in terms of your output? Be sure you've set UTF-8 across the board. Though I'm not familiar with "simple_html_dom" -- do you mean this? http://simplehtmldom.sourceforge.net/ If so I'd not be surprised if it doesn't support non latin-1 characters, it seems a little fly-by-night. Is there some reason you're using some goofy redundant script instead of DOMDocument? http://php.net/manual/en/class.domdocument.php Have I ever mentioned how much I hate it when people write libraries, frameworks and other such systems that replicate existing functionality?