polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

Add normalizer_get_raw_decomposition function

Open IonBazan opened this issue 6 years ago • 4 comments

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.

IonBazan avatar May 12 '18 23:05 IonBazan

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 avatar May 13 '18 07:05 nicolas-grekas

@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?

IonBazan avatar May 14 '18 15:05 IonBazan

Sure, the script is here: https://github.com/tchwork/utf8/blob/master/src/Patchwork/Utf8/Compiler.php

nicolas-grekas avatar Aug 05 '18 13:08 nicolas-grekas

Note that the compilation script is now part of the repo: https://github.com/symfony/polyfill/blob/master/tests/Compiler.php

nicolas-grekas avatar Jul 24 '20 07:07 nicolas-grekas