Jump to content

XMLWriter: encoding='Windows-1252'


icepick.pt

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.