• Plugin looks very handy. But when I used it all the non-english symbols on a page turned into “????” after saving the page.

    Pity, it is not maintained now.

Viewing 1 replies (of 1 total)
  • Thread Starter Kirr

    (@kirr)

    Well… I’ve managed this.
    (warning: I’m not a php dev!)

    The culprit was following line in wp-shortcode-highlighter.php:
    $dom->loadHTML('<div>' . utf8_decode(stripslashes($data['post_content'])) . '</div>');

    utf8_decode function converts text into Latin-1 encoding.

    To avoid the using of utf8_decode I patch the code with snippet from here: https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly/8218649#8218649

    $dom->loadHTML('<?xml encoding="utf-8" ?>' . '<div>' . stripslashes($data['post_content']) . '</div>');

    I’m not sure about reliability of this solution but it works for me now.

    • This reply was modified 6 years, 8 months ago by Kirr.
Viewing 1 replies (of 1 total)
  • The topic ‘Kills the national symbols’ is closed to new replies.