Forum


Replies: 4   Views: 3875
Removing display of unknown characters in 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 msaunders  · 18-07-2013 - 15:02

I have got a complex document generated completely on the fly using embedHTML but am seeing a lot of Diamond Question marks which is words 'unknown' character, is there a way to tell word not to display them.



 



They are caused by   even though i have stripped out spaces and that space code, it still is determined to display the unknown symbols.



Anyone have any useful hint?



Thanks all



 


Posted by msaunders  · 18-07-2013 - 15:16

I have tried $docx->setEncodeUTF8(); but it just changes the char to some other characters


Posted by admin-phpdocx  · 19-07-2013 - 10:13

Although PHPDocX tries to detect automatically the codification of the HTML code sometimes fails because the PHP methods are not fully reliable to that respect.



Do you know which codification are you using?



If so, pelase include a charset metatag with the correct encoding or try to utf8-encode the HTML before passing it to PHPDocX.



If nothing works, please, send us a sample to contact and we will have a look at it.


Posted by jorgelj  · 30-07-2013 - 09:34

Hello,



setEncodeUTF8 method forces UTF8 charset, if you want to detect charsets and encode non UTF8 strings just open config/phpdocxconfig.ini file and set



encode_to_UTF8 = "false"



to true.



Regards.