문제

I'm writing text from database to ODT document table using odtphp, using this http://www.odtphp.com/index.php?i=tutorials&p=tutorial6 example. In generated ODT some international characters are encoded wrong (or not encoded?). There was similar problem with other values, not in segments, that were set using setVar() function, but it was solved using

$odf->setVars($k, $v, true, 'UTF-8');

Looks like there's no additional settings for segment values.

도움이 되었습니까?

해결책

Looks like that all text in segments were encoded to UTF-8 again, even if text has already been in UTF-8. Currently I solved this issue by replacing line 203 in Segment.php from odtphp with following code:

return $this->setVars($meth, $args[0], false, 'UTF-8');
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top