Page 1 of 1

simplexml_load_file()

Posted: Fri Feb 08, 2008 4:47 pm
by jmamede
I am usein simplexml_load_file() to load a XML page, .... but it has latin characters and I get this message loading my page:

Warning: simplexml_load_file() [function.simplexml-load-file]: input conversion failed due to input error, bytes 0x90 0x43 0x54 0x52 in D:\xampp\htdocs\SAFT\saftpt1.php


My code for the PHP page is like this:

<?php

session_start();

$FileName = $_REQUEST["filepath"];

$AuditFile = simplexml_load_file("$FileName");

$AuditFileVersion = $AuditFile->Header->AuditFileVersion;
$CompanyID = $AuditFile->Header->CompanyID;
$TaxRegistrationNumber = $AuditFile->Header->TaxRegistrationNumber;
$TaxAccountingBasis = $AuditFile->Header->TaxAccountingBasis;


Howcan I read the XML file as UTF-8??

Thanks

Re: simplexml_load_file()

Posted: Fri Feb 08, 2008 5:09 pm
by Zoxive
http://www.google.com/search?q=input+co ... nput+error
It seems that Korean, Japanese, and other Asian pages
are especially likely to cause the error (no surprise there).
(Link)