From 8a2f3a00282a477204028b491090cab5dec32f65 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Mon, 28 Dec 2020 20:48:57 -0500 Subject: [PATCH] This seems to work better with unicode values - this seems to not break anything (that I know of) - possibly a fix for issue 23, at least for most common cases (there are other iconv usages still in the code) https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/23 --- inc/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index e276ac3f..3a624ff1 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2717,7 +2717,8 @@ function slugify($post) { $slug = mb_convert_encoding($slug, "UTF-8", "UTF-8"); // Transliterate local characters like ΓΌ, I wonder how would it work for weird alphabets :^) - $slug = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $slug); + // $slug = iconv("UTF-8", "ASCII//TRANSLIT//IGNORE", $slug); + $slug = mb_convert_encoding($slug, "ASCII", "UTF-8"); // Remove Tinyboard custom markup $slug = preg_replace("/]+>.*?<\/tinyboard>/s", '', $slug);