1
Vote

Character Encoding On Internal XMLs Being Set To CP1252

description

XML files being written to presentation are being written with default file encoding (CP1252) instead of UTF-8. This is causing issues when putting special characters in a slide. The fix is to utf8_encode() the string being fed into the slide xml (Line 230 /Writer/PHPPowerPoint2007.php):
$objZip->addFromString('ppt/slides/slide' . ($i + 1) . '.xml', utf8_encode($this->getWriterPart('Slide')->writeSlide($this->_presentation->getSlide($i))));
I'm not sure if this is necessary anywhere else; but it definitely resolves all the special character issues I was having.

file attachments

comments