Forum


Replies: 1   Views: 2599
Problem with encoding of docx document
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 legaltrek  · 05-07-2017 - 14:02

Hello,

I have problem with some of the symbols from the German alphabet and they visualise broken in the DOCX. I tried to fix it with

$docx->setEncodeUTF8()

but it didn't work because the text already had UTF 8 encoding.

For example when I try to add Straße in docx looks like Straße. Can you help me, my code is like this 

....

$valuesTable = array(); 

$valuesTable[] =

array(
     array(
         "value" => "Straße"
      )

);

$paramsTable = array(
     'border'         => 'none',
     'tableAlign'     => 'center',
     'textProperties' => array('fontSize' => 10),
      'tableWidth'     => array('type' => 'pct', 'value' => 100)

);

$docx->addTable($valuesTable, $paramsTable);

....

I will be very grateful.

Regards