icepick.pt Posted March 26, 2009 Share Posted March 26, 2009 Hello good people I need to produce a XML file with this top line: "<?xml version="1.0" encoding='Windows-1252' ?>" I am using the XMLwriter extension on PHP 5.1.6, so the enconding should be declared on the startDocument() function, like this: $obj = startDocument( '1.0' , 'Windows-1252' ); but then ... the script crashes! I don't know why, but when using any other encoding string than 'UTF-8' my PHP script does not work. However, when I use 'UTF-8' or simply use nothing at all, it works fine. Can anyone tell me why is it happening? Is there any workaround for it ? Regards! Link to comment https://forums.phpfreaks.com/topic/151169-xmlwriter-encodingwindows-1252/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.