Search Results

Search found 1 results on 1 pages for 'zital'.

Page 1/1 | 1 

  • php XML DOM translates special chars to &#xYY;

    - by ZiTAL
    I send this with AJAX POST: <li><ul class "zone zCentral ui-sortable"><li><ul class="region rCol3 ui-sortable"><li class="" style=""><div><span class="tc tc_video">574081</span> <span>video: 'Mundo.Hoy': ¿Dónde habré olvidado... mi memoria?</span></div></li></ul></li></ul></li> I do this to create XML: header('Content-type: text/html; charset=utf-8'); if(isset($_POST) && isset($_POST['data'])) { $data = '<ul id="zone_container" class="ui-sortable">'; $data .= $_POST['data']; $data .= '</ul>'; $dom = new DOMDocument('1.0', 'utf-8'); $dom->loadXML($data); echo $dom->saveXML(); exit(); } and i get this: <?xml version="1.0"?> <ul id="zone_container" class="ui-sortable"> <li><ul class="zone zCentral ui-sortable"><li><ul class="region rCol3 ui-sortable"><li class="" style=""><div><span class="tc tc_video">574081</span> <span>video: 'Mundo.Hoy': &#xBF;D&#xF3;nde habr&#xE9; olvidado... mi memoria?</span></div> </li></ul></li></ul></li></ul> ¿Dónde habré olvidado... mi memoria? translates to: &#xBF;D&#xF3;nde habr&#xE9 ; olvidado... mi memoria? Y need original chars in the XML, these are utf-8 valid i don't know the reason for this encode :(

    Read the article

1