From cc9dcac148a7da90a8e425cb69957b72630b3ce2 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 12 Feb 2024 19:23:23 -0600 Subject: [PATCH] Fix BOM removal when a classlist file is read. This was broken when the UTF-8 encoding method was changed in #1831. Since the file contents are now UTF-8 decoded, a different regular expression is needed to match a BOM. This replaces #2305. That pull request will be closed. --- lib/WeBWorK/File/Classlist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WeBWorK/File/Classlist.pm b/lib/WeBWorK/File/Classlist.pm index edce1670e3..7e242cb903 100644 --- a/lib/WeBWorK/File/Classlist.pm +++ b/lib/WeBWorK/File/Classlist.pm @@ -54,7 +54,7 @@ sub parse_classlist($) { # Remove a byte order mark from the beginning of the file if present. Excel inserts this on some systems, and # the presence of this multibyte character causes a classlist import to fail. - s/^\xEF\xBB\xBF//; + s/^\x{FEFF}//; s/^\s*//; s/\s*$//;