From bd05f04fe4f816c76223968b3333623f54edde50 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Fri, 15 Jan 2021 23:28:08 +0100 Subject: [PATCH] Fix download issue with Chrome --- download.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/download.php b/download.php index a5baae6..c339066 100644 --- a/download.php +++ b/download.php @@ -26,8 +26,10 @@ function cleanString($string) { $string = str_replace('Æ','ae', $string); $string = str_replace('æ','ae', $string); $string = str_replace('œ','oe', $string); - $string = preg_replace("/[^a-z\d-_ ]/i","", $string); + setlocale(LC_ALL, "en_US.utf8"); + $string = iconv("utf-8", "ascii//TRANSLIT", $string); $string = str_replace(" ","_", trim($string)); + $string = str_replace(",","", trim($string)); $string = strtolower($string); return $string; }