Forum


Replies: 3   Views: 4268
weird characters when convert cjk html to 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 foobar  · 11-02-2014 - 10:27

Hey,



I have tried to conver http://www.douban.com/ to docx, but i got Weird Characters.



my check.php:



OK PHP version is 5.2.x

OK Zip support is enabled.

OK XSL support is enabled.

OK DOM support is enabled.

OK XML support is enabled.

OK Tidy support is enabled.

OK The path examples/docx used by the examples is writable.

OK The library can write to temp folder.



config:



[settings]

; absolute path to the temp dir. If empty the default system tmp directory will be used

temp_path = "d:/tmp"



; if set to true: detects if the contents are UTF-8 encoded and if not encodes them

; if set to false do nothing

encode_to_UTF8 = "false"



; default document language

language = "en-US"



; default paper size

paper_size = "A4"



; right to left languages config

; bidi = "true"

; rtl = "true"



[license]

; PHPDocX license code

code = "1xxxx9"

; email of the user that got the trial

email = "xxx@xxx.com"



my code:



<?php

$phpdocxconfig = parse_ini_file('D:/phpdocx_trial/config/phpdocxconfig.ini');

require_once 'D:/phpdocx_trial/classes/\CreateDocx.inc';



$docx = new CreateDocx();



$html='http://www.douban.com/';



$docx->embedHTML($html, array('isFile' => true));



$docx->createDocx('d:\01');


Posted by foobar  · 12-02-2014 - 03:33

can it be fixed?

Posted by jorgelj  · 12-02-2014 - 09:01

Hello,

 

 

Please try enconding the string as UTF8 and check that your server has Tidy and mbstring extensions enabled.

 

 

 

 

Regards.