To fix this, add some code to libs/link.php:
class PliggHTTPRequest:
Code:
//new variable for content-type header var $content_type; //content-type
Code:
if(isset($headers['content-type'])) $this->content_type = $headers['content-type'];
Code:
if(preg_match('/charset=([a-zA-Z0-9-_]+)/i', $this->html, $matches)) {
//no need to change code here - kossmoss
.....
.....
}
else if(preg_match('/charset=([a-zA-Z0-9-_]+)/i', $r->content_type, $matches)) {
$this->encoding=trim($matches[1]);
//you need iconv to encode to utf-8
if(function_exists("iconv"))
{
if(strcasecmp($this->encoding, 'utf-8') != 0) {
//convert the html code into utf-8 whatever encoding it is using
$this->html=iconv($this->encoding, 'UTF-8//IGNORE', $this->html);
}
}
} 







Linear Mode




