Forum


Replies: 10   Views: 6451
Problem with some utf8 character
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 moreit  · 26-04-2014 - 18:02

Hi,



I'm using phpdocx pro trial. Some utf8 characters are okay but some of them shows up stange character when i make the docx.



This charaters are okay: ç, ü, ö, Ö, Ç, Ü



But this characters shows up strange form: ı, ş, ğ, İ, Ş, Ğ



I tried to set encoding and language code but didn't help. Is there anything i can do?



Thank you,


Posted by jorgelj  · 28-04-2014 - 09:34

Hello,



Are you using an UTF8 editor? Please try enabling this option:



encode_to_UTF8



in config/phpdocxconfig.ini



Regards.


Posted by moreit  · 08-05-2014 - 22:59

Hi,



I set encode_to_UTF8 = "true" but it didn't helped.



I'm using embedHTML. All special utf8 characters are saved as ascii in DB. When I create the docx with characters like ü, ö, ç are okay. They are also saved as ascii code. But the characters like ş, ı ğ show up like ı, Ş.



Before create docx I tried to convert them to real characters from ascii but nothing changed.



Is there anything i can try?



Thank you,


Posted by jorgelj  · 09-05-2014 - 09:05

Hello,



You need to installa and enable Tidy and enconde the string before using the embedHtml method.



Regards.


Posted by moreit  · 10-05-2014 - 19:00

Hello,



I have enabled Tidy. Now I'm getting symbol ? instead strange characters. Is it something good?


Posted by jorgelj  · 12-05-2014 - 09:59

Hello,



Please try encoding and not enconding the string. If you want you can send us the script to test it on our servers.



Regards.


Posted by moreit  · 12-05-2014 - 10:20

Hi,



How can i sent it to you?


Posted by jorgelj  · 12-05-2014 - 12:25

Hello,



http://www.phpdocx.com/contact



Regards.


Posted by moreit  · 13-05-2014 - 13:12

Hi,



We have solved ptoblem with converting characters to ascii manuel before embed it. Bu now after we create the file we get this error in log:



 



PHP Fatal error:  Uncaught exception 'Exception' with message 'Error while extracting settings.xml file from the base template to insert the background image' in /www/phpdocx/classes/AutoLoader.inc(2) : eval()'d code:2\nStack trace:\n#0 /www/phpdocx/classes/CreateDocx.inc(514): PhpdocxLogger::logger('Error while ext...', 'fatal')\n#1 /www/phpdocx/classes/CreateDocx.inc(623): CreateDocx->addBackgroundImage('/www...')\n#2 /www/Download.php(63): CreateDocx->createDocx('dosya/dugun-ded...')\n#3 {main}\n  thrown in /www/phpdocx/classes/AutoLoader.inc(2) : eval()'d code on line 2, referer: /MemberPurchasedHistory.php



Can you please help?



 


Posted by jorgelj  · 13-05-2014 - 13:41

Hello,



As the trial version is enconded and encrypted is really hard to know where you have the issue, and it doesn't include support. We recommend you to upgrade to PRO, PRO+, Corporate or Enterprise versions.



Regards.