Forum


Replies: 8   Views: 3599
Utf-8 issues
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 Squad internet  · 11-04-2013 - 12:13

Update:

I changed the default char-encoding in my php config to utf-8.
Now when I use :

[code]
$docx->addText(utf8_encode(html_entity_decode('& uuml;'));
[/code]

I get it working for this single char.
However, when I call the same encode/decode chain with the actual string I need to use, it doesn't work anymore ;(

[code]
$docx->addText(utf8_encode(html_entity_decode($db['textField']));
[/code]

When I echo the $docx object, and view the src, it looks like proper encoding, but when writing it to a file and downloading it, it tells me there are "incorrect characters" in the document.

What is going on here,.. plz anyone know how to fix this?