bugfix encoding ICML loading
This commit is contained in:
parent
e8ffdbc62c
commit
c67359ce94
@ -11,7 +11,6 @@ class ICMLLoader {
|
|||||||
public $propertiesProduct;
|
public $propertiesProduct;
|
||||||
public $application;
|
public $application;
|
||||||
public $encoding = 'utf-8';
|
public $encoding = 'utf-8';
|
||||||
public $defaultCharset = null;
|
|
||||||
|
|
||||||
protected $fp;
|
protected $fp;
|
||||||
protected $mainSection = 1000000;
|
protected $mainSection = 1000000;
|
||||||
@ -29,9 +28,6 @@ class ICMLLoader {
|
|||||||
|
|
||||||
$this->isLogged = true;
|
$this->isLogged = true;
|
||||||
|
|
||||||
$this->defaultCharset = LANG_CHARSET;
|
|
||||||
|
|
||||||
|
|
||||||
$this->PrepareSettings();
|
$this->PrepareSettings();
|
||||||
|
|
||||||
$this->fp = $this->PrepareFile($this->filename. '.tmp');
|
$this->fp = $this->PrepareFile($this->filename. '.tmp');
|
||||||
@ -83,10 +79,7 @@ class ICMLLoader {
|
|||||||
|
|
||||||
protected function PrepareValue($text)
|
protected function PrepareValue($text)
|
||||||
{
|
{
|
||||||
if ($this->defaultCharset === "")
|
$newText = $this->application->ConvertCharset($text, mb_detect_encoding($text), $this->encoding);
|
||||||
$this->defaultCharset = mb_detect_encoding($text);
|
|
||||||
|
|
||||||
$newText = $this->application->ConvertCharset($text, $this->defaultCharset, $this->encoding);
|
|
||||||
$newText = strip_tags($newText);
|
$newText = strip_tags($newText);
|
||||||
$newText = str_replace("&", "&", $newText);
|
$newText = str_replace("&", "&", $newText);
|
||||||
return $newText;
|
return $newText;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user