Replies: 2   Views: 3353
Setencodeutf8 problems.
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 beauware  · 19-04-2013 - 18:04

I have been on this for the pass 2 days, so I am asking for help now.

I have a form, text boxes on it, and I use replaceTemplateVariableByHTML to place text in my document. Easy stuff, no special things here. In english, just fine, in french refuse to display the accents correctly in the word document generated. If I just break the code (die) and echo my form variable, the accents are fine in the php page.

I have look in Google every possible problems with UTF8 and I am ok since it display fine from a post form.

I have also scan this KB, and the solutions listed don't work for me. From what I understant it is with replaceTemplateVariableByHTML, addText seems to work.

What I have tried/added:

header('content-type: text/html; charset: utf-8');

setlocale(LC_ALL, 'fr_FR');



iconc, utf8_convert, mb_convert_encoding