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

detect buggy iconv() with //IGNORE and use mbstring if exists or warn admins (backport of MDL-32586 and MDL-33007)

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      This is about to execute lib/simpletest/testmoodlelib.php under certain conditions:

      1- TEST: unit tests pass under a "good" system (MacOS using mac ports LAMP stack, like the laptop integration server).

      2- TEST: unit tests pass under a "glibc" system (debian, ubuntu, like the "integrationci" integration server).

      3- TEST: unit tests pass under a "bad" system (redhat? or, alrernatively, hack fix_utf8() and set $buggyiconv = true, so fallback to mbstring will be used if available.

      4- TEST: unit test fail in a "completely borked" system. With the hack in previous point in action, disable mbstring (or hack the function_exists('mb_convert_encoding') check).

      Show
      This is about to execute lib/simpletest/testmoodlelib.php under certain conditions: 1- TEST: unit tests pass under a "good" system (MacOS using mac ports LAMP stack, like the laptop integration server). 2- TEST: unit tests pass under a "glibc" system (debian, ubuntu, like the "integrationci" integration server). 3- TEST: unit tests pass under a "bad" system (redhat? or, alrernatively, hack fix_utf8() and set $buggyiconv = true, so fallback to mbstring will be used if available. 4- TEST: unit test fail in a "completely borked" system. With the hack in previous point in action, disable mbstring (or hack the function_exists('mb_convert_encoding') check).
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:

      Description

      This is a followup of MDL-32586 and MDL-33007, aimed to:

      • Improve fix_utf8() to avoid some annoying notices and provide mbstring() alternative for buggy iconv libraries (not supporting //IGNORE).
      • Inform the admin (in notifications page and/or environmental checks, to decide) about the site being run using a buggy iconv without mbstring alternative.

      To backport to 22 and 21, ideally, once the original issues have been tested in a bunch of OS/PHP combinations. I think this will make life really better for a lot of debian/ubuntu/redhat sites.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Integrator:
                Sam Hemelryk
                Tester:
                Dan Poltawski
                Participants:
                Component watchers:
                cameron1729, David Mudrák (@mudrd8mz), Helen Foster, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/12