anonīms Posted January 8, 2013 Report Share Posted January 8, 2013 Nav iespējams atvērt xml failu caur IE8,IE7. Caur IE9 viss ir okey. The XML page cannot be displayed <?xml version="1.0" encoding="WINDOWS-1257" standalone="yes" ?> <pieteikums> <datums>2013.01.29</datums> <laiks>15:00</laiks> <valoda>LV</valoda> <grupa>induviduals</grupa> <apmekletaji><apmekletajs vards="xml encoding" Darbs="xml encoding"/></apmekletaji> <Kontaktpersona>xml encoding</Kontaktpersona> <Kontaktinformacija>xml encoding / xml encoding</Kontaktinformacija> <Organizacija>xml encoding</Organizacija> <velmes>xml encoding</velmes> </pieteikums> $xml_name = 'rezervacija'.$data['rid'].'.xml'; $xmlPath = file_create_filename($xml_name, file_build_uri('')); $xml = iconv("UTF-8","windows-1257//IGNORE",$xml); file_put_contents($xmlPath, "\xEF\xBB\xBF". $xml); Kur varētu būt problēma. Centos arī caur notepad++ ieiet pie encodinga un uzlikt failam characters > baltic > win1257, bet panākumi nekādi... Kur varētu būt gļuks? Quote Link to comment Share on other sites More sharing options...
anonīms Posted January 8, 2013 Author Report Share Posted January 8, 2013 Nevar edit uztaisīt. Izskatās, ka gļuks ir ar BOM? Vai taisnība. Ieseivojot utf8 without BOM atver visos browseros. Quote Link to comment Share on other sites More sharing options...
aaxc Posted January 8, 2013 Report Share Posted January 8, 2013 Pareizi saprati. Quote Link to comment Share on other sites More sharing options...
anonīms Posted January 8, 2013 Author Report Share Posted January 8, 2013 Tagad tāds sīkums, ka vajag šo failu ieseivot bez BOM, bet meklēju un nevaru atrast. Varbūt kādām ir piemērs kāds? Quote Link to comment Share on other sites More sharing options...
aaxc Posted January 8, 2013 Report Share Posted January 8, 2013 Šis neder? Quote Link to comment Share on other sites More sharing options...
anonīms Posted January 8, 2013 Author Report Share Posted January 8, 2013 Stipri šaubos, ja domā par mb.. // send mail $xml_name = 'rezervacija'.$data['rid'].'.xml'; $xmlPath = file_create_filename($xml_name, file_build_uri('')); dsm(mb_detect_encoding($xml)); $xml = mb_convert_encoding($xml, 'UTF-8', "auto"); dsm(mb_detect_encoding($xml)); file_put_contents($xmlPath, $xml); gan pirmais, gan otrais dsm (aka print) izvada utf-8 Quote Link to comment Share on other sites More sharing options...
blackhalt Posted January 8, 2013 Report Share Posted January 8, 2013 Īsti nesapratu, betfile_put_contents($xmlPath, "\xEF\xBB\xBF". $xml);\xEF\xBB\xBF ir tas BOM Vispār mūsdienās lieto utf-8 Quote Link to comment Share on other sites More sharing options...
anonīms Posted January 10, 2013 Author Report Share Posted January 10, 2013 blackhalt, jā, piekrītu, bet nu a ko darīt, ja klientiem tādai sistēmai kko jāpadod :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.