diff --git a/question/type/shortanswer/question.php b/question/type/shortanswer/question.php index cb3c8a493f8..ba1dfc786dc 100644 --- a/question/type/shortanswer/question.php +++ b/question/type/shortanswer/question.php @@ -87,6 +87,11 @@ class qtype_shortanswer_question extends question_graded_by_strategy } public static function compare_string_with_wildcard($string, $pattern, $ignorecase) { + + // Normalise any non-canonical UTF-8 characters before we start. + $pattern = self::safe_normalize($pattern); + $string = self::safe_normalize($string); + // Break the string on non-escaped asterisks. $bits = preg_split('/(?