get encoding from default site
This commit is contained in:
parent
5df36eaa5d
commit
5ce54327c2
@ -11,6 +11,7 @@ class ICMLLoader {
|
||||
public $propertiesProduct;
|
||||
public $application;
|
||||
public $encoding = 'utf-8';
|
||||
public $encodingDefault = 'utf-8';
|
||||
|
||||
protected $fp;
|
||||
protected $mainSection = 1000000;
|
||||
@ -28,6 +29,9 @@ class ICMLLoader {
|
||||
|
||||
$this->isLogged = true;
|
||||
|
||||
$defaultSite = CSite::GetList($by="def", $order="desc", Array())->Fetch();
|
||||
$this->encodingDefault = $defaultSite["CHARSET"];
|
||||
|
||||
$this->PrepareSettings();
|
||||
|
||||
$this->fp = $this->PrepareFile($this->filename. '.tmp');
|
||||
@ -79,7 +83,7 @@ class ICMLLoader {
|
||||
|
||||
protected function PrepareValue($text)
|
||||
{
|
||||
$newText = $this->application->ConvertCharset($text, mb_detect_encoding($text), $this->encoding);
|
||||
$newText = $this->application->ConvertCharset($text, $this->encodingDefault, $this->encoding);
|
||||
$newText = strip_tags($newText);
|
||||
$newText = str_replace("&", "&", $newText);
|
||||
return $newText;
|
||||
|
Loading…
Reference in New Issue
Block a user