Commit 8c1715d5 by Antonio Ramirez

remove UTF-8 string conversion

parent b918fa50
...@@ -449,8 +449,6 @@ class BaseInflector ...@@ -449,8 +449,6 @@ class BaseInflector
*/ */
public static function slug($string, $replacement = '-', $lowercase = true) public static function slug($string, $replacement = '-', $lowercase = true)
{ {
// ensure UTF-8 and remove invalid UTF-8 chars.
$string = mb_convert_encoding((string) $string, 'UTF-8', mb_list_encodings());
if (extension_loaded('intl') === true) { if (extension_loaded('intl') === true) {
$options = 'Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove;'; $options = 'Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove;';
$string = transliterator_transliterate($options, $string); $string = transliterator_transliterate($options, $string);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment