polyfill
polyfill copied to clipboard
Add normalizer_get_raw_decomposition function
I would be good to support normalizer_get_raw_decomposition function that appeared in PHP 7.3. I've tried to implement it but seems that existing decomposition data is already optimized to get the final decomposition. Example test case is available here.
Pinging @nicolas-grekas as he is the author of Normalizer
polyfill.
Would be great :) and you're right, the map is optimized for normalization. We need to ship a separate map to be able to provide the intermediate decompositions.
@nicolas-grekas Can you provide the steps you've took to generate normalization mapping? Is there any script available to base on? What do you think about commiting the script into the repository?
Sure, the script is here: https://github.com/tchwork/utf8/blob/master/src/Patchwork/Utf8/Compiler.php
Note that the compilation script is now part of the repo: https://github.com/symfony/polyfill/blob/master/tests/Compiler.php