diff --git a/webapp/src/Controller/Jury/ExecutableController.php b/webapp/src/Controller/Jury/ExecutableController.php index 3af01378d8..da9200734f 100644 --- a/webapp/src/Controller/Jury/ExecutableController.php +++ b/webapp/src/Controller/Jury/ExecutableController.php @@ -413,9 +413,9 @@ protected function dataForEditor(Executable $executable): array /** @var ExecutableFile $file */ $filename = $file->getFilename(); $content = $file->getFileContent(); - if (!mb_check_encoding($content, 'ASCII')) { + if (!mb_detect_encoding($content, null, true)) { $skippedBinary[] = $filename; - continue; // skip binary files + continue; // Skip binary files. } $filenames[] = $filename; $file_contents[] = $content; diff --git a/webapp/templates/jury/executable_content.html.twig b/webapp/templates/jury/executable_content.html.twig index fcc74576a8..e1dbe4eddb 100644 --- a/webapp/templates/jury/executable_content.html.twig +++ b/webapp/templates/jury/executable_content.html.twig @@ -13,11 +13,11 @@
{{ file }}