|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-06 08:22 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ I tried to load a xml file with ISO-8859-1 encoding. I have tried several ways for loading, but I had no success because simplexml returns the loaded string with errors. I have tried iconv functions too. Reproduce code: --------------- file test.php: <?php include ("example.php"); $xml = simplexml_load_string($xmlstr); echo $xml->movie[0]->plot; ?> file example.php: <?php $xmlstr = <<<XML <?xml version='1.0' encoding="ISO-8859-1"?> <movies> <movie> <plot> Matr?cula </plot> </movie> </movies> XML; ?> Expected result: ---------------- Matr?cula Actual result: -------------- MatrĂcula