Forum


Replies: 8   Views: 4225
Problem with accent in addtext and embedhtml
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 llouis  · 11-04-2013 - 12:13

According to your question about IDE, you perhaps think about the text encoding for the PHP source file.
Then to complete the previously described problem, my PHP file was ANSI encoded.

But I did more try by saving the source file with UTF-8 encoding (without BOM), then:
1. If I let the call to setEncodeUTF8 function, then both text (added by AddText and HTML embedded) are not well rendered.
2. If I comment the call to setEncodeUTF8 function, only the text added by AddText is well rendered, the html text added in the table shows bad characters.

Basically, by modifying the source encoding charset to UTF-8 (without BOM), the document is well produced (I mean no error occur when I open it with word) BUT I don't yet have the expected result ( to text with accent well rendered by adding with AddText and by embedding HTML in the same time)