Menu ▾ ▴

#171 parsing some arabic websites return only �������

closed
charset (7)
2019-04-19
2014-01-21
winumber
No

parsing some arabic websites return only ������� did anyone work on fixing such charactersets not supporting by this library? if no then i can spend few hours on fixing this issue but require little help from author of this library to look into the code specifically handling this charactersets.

Discussion

  • LogMANOriginal

    LogMANOriginal - 2019-04-18

    Ticket moved from /p/simplehtmldom/support-requests/27/

    Can't be converted:

    • _milestone: v1.0_(example)
    • _priority: 1
     
  • LogMANOriginal

    LogMANOriginal - 2019-04-18
    • Labels: --> charset
     
  • LogMANOriginal

    LogMANOriginal - 2019-04-19
    • status: open --> closed
    • assigned_to: John Schlick --> LogMANOriginal
    • discussion: enabled --> disabled
     
  • LogMANOriginal

    LogMANOriginal - 2019-04-19

    Closing because it works with the latest version. Please don't hesitate to open a new ticket if this is still an issue for you.

    The original link from above doesn't work for me, so I used following test script to load arabic characters:

    <?php
    
    require_once 'simple_html_dom.php';
    
    $html = file_get_html('http://www.bbc.com/arabic');
    
    echo $html->find('p', 0) . PHP_EOL;
    
    // Returns
    // <p class="buzzard__summary">رئيس الحكومة الليبية المدعومة من الأمم المتحدة يدين &quot;صمت&quot; حلفائه الدوليين أمام زحف قوات خليفة حفتر المناوئة نحو العاصمة طرابلس.</p>
    

    That said, the contents are UTF-8 encoded. It might not work for different character sets. Again, don't hesitate to open a new ticket if this is still an issue.