encoding="UTF-8" doesn't guarantee that XML is encoded in UTF-8 its only purpose is to tell XML parser how to decode that XML document . it is responsibility of document creator to ensure that XML is proper UTF-8 document .

on PHP side when creating XML there are number of functions to ensure UTF-8 strings though there are some issues in PHP5 , and one of the main features of upcoming PHP6 is to address UTF-8 Issues that current PHP has.

some of UTF functions

utf8_encode — Encodes an ISO-8859-1 string to UTF-8
string utf8_encode  ( string $data  )


On Feb 22, 2008, at 4:52 PM, Larry Brown wrote:

I am using PHP on Linux to communicate with an XML peer.  I pull and
push documents from and to their server. On the console I use UTF-8 as
far as I can tell.  When I send these documents should my leading tag
read:

<?xml versionnn="1.0" encoding="UTF-8"?>

or is the encoding done by PHP and how do I know what it is encoded to?

TIA

Larry

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Bojan Tesanovic
http://www.classicio.com/
http://www.real-estates-sale.com/



Reply via email to