Open nicolas-grekas opened 5 years ago
Interesting. This package is actually brand new, extracted from the Stringy and portable-utf8 packages, and was created, at least in part, by my desire to have Laravel 7 start using this package's ascii conversion: https://github.com/voku/Stringy/issues/20, https://github.com/laravel/framework/pull/29947.
@nicolas-grekas interesting package and what a loop :) https://github.com/nicolas-grekas/symfony/blob/string-component/src/Symfony/Component/String/Utf8String.php#L99 ... and yes I can / will try to use this library as polyfill.
Hi there!
In case you missed it, I'm working on abandoning patchwork/utf8 in favor of https://github.com/symfony/symfony/pull/33553 In this PR, I'm using
transliterator_transliterate()
to implement UTF-8 to ASCII transliterations (seeAbstractUnicodeString::ascii()
). But when the intl extension is not installed, I just skip the call and fallback to NFKC + maps + iconv.It would be super cool if we could polyfill this function from intl (a subset of its behavior at least). This package is the closest I know. Would you consider porting it to https://github.com/symfony/polyfill/tree/master/src/Intl?