Forum


Replies: 5   Views: 4295
Special characters not shown from html to docx
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by KRav  · 22-06-2016 - 12:50

Hi there, 

I try to insert special characters into 

oDocx->embedHTML

The problen is, that the given html string has this " größe, Köln " etc.

I docx it shows something like this "ö" for "ö"

 

I try this, without success:

$oPurify = new CHtmlPurifier();

$sIntroText = $this->aData['intro']['text'];
$aIntroText = explode('{{tabelle}}', $sIntroText);
$this->oDocx->addBreak(array('type' => 'page'));

$this->oDocx->embedHTML($oPurify->purify($aIntroText[1]));

What I'm doing wrong?

Posted by KRav  · 24-06-2016 - 13:51

It's not poosible to install tidy up.

Posted by KRav  · 28-06-2016 - 21:05

I'm using the pro version. And use docx in YII.

I disabled the utf-8 in the config file meanwhile without success.

I have a clean html string like that: '<p> ÜÄÖ</p>'

$this->oDocx->embedHTML('<p> ÜÄÖ</p>');

And I get this "Ä Ü Ä Ã" this wired characters with boxes..

From my point of view the is clean - do I have to convert this charcters before? What would tidy do?