Closed
Description
Symfony version(s) affected: 5.0.*
Description
slug() crop string after some symbols if ICONV_IMPL === 'glibc'
How to reproduce
public function __construct(SluggerInterface $slugger) {
$slug = $slugger->slug('Отель Отель')->lower(); // 'Ote'
$slug = $slugger->slug('ль Отель')->lower(); // ''
$slug = $slugger->slug('Рь Отель')->lower(); // ''
}
Possible Solution
AbstractUnicodeString.php
} elseif (ICONV_IMPL === 'glibc') {
$s = iconv('UTF-8', 'ASCII//TRANSLIT', $s);
} else {
change to
} elseif (ICONV_IMPL === 'glibc') {
$s = iconv('UTF-8', 'ASCII//IGNORE//TRANSLIT', $s);
} else {
Additional context