Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25018

html_to_text destroys UTF-8 strings

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.9.10
    • 1.9.11
    • Libraries
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      html_to_text destroys UTF-8.

      Here is an example

      <?php
      require_once('config.php');
      header('Content-type: text/plain; charset=UTF-8');
      $htmlstring = "<p>Choose the correct answer for this occasion:</p><p><strong>How do you say you are sorry e.g.. at someone's misfortunes?</strong><strong></strong></p>";
      echo "Testing input to see if it is UTF-8: ", iconv("UTF-8", "UTF-8", $htmlstring);
      $textstring = html_to_text($htmlstring);
      echo "Testing output to see if it is UTF-8: ", iconv("UTF-8", "UTF-8", $textstring);

      Attachments

        Activity

          People

            timhunt Tim Hunt
            timhunt Tim Hunt
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              21/Feb/11