XML: encoding='Windows-1252'

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
icepick
Forum Newbie
Posts: 5
Joined: Fri Mar 13, 2009 9:37 am
Location: Portugal

XML: encoding='Windows-1252'

Post by icepick »

Hello good people

I need to produce a XML file with:

"<?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!
Post Reply