::id rule specifies an unknown transliterator when creating Transliterator.
Created by: AntoJvlt
Hello,
I encounter an error when trying to create an instance of Transliterator with a compound IDs rule:
The final rule that I want to use is:
:: NFD (); [[:Nonspacing Mark:] [:Cf:]] >; :: lower (); [[:Punctuation:][:Space:]]+ > ' '; :: NFC ();
When I do: Transliterator.createInstance(":: NFD (); [[:Nonspacing Mark:] [:Cf:]] >; :: lower (); [[:Punctuation:][:Space:]]+ > ' '; :: NFC ();")
I get the error: icu.ICUError: A '::id' rule specifies an unknown transliterator, error code: 65569
Following ICU documentation this rule should works.
I tried to decompose the rule in order to find what transliterator id makes an error.
It seems that the syntax with ::
creates an error, so this rule works:
NFD (); lower (); NFC ();
And the replacement operator >
creates an error too, so this rule works:
NFD (); [[:Nonspacing Mark:] [:Cf:]] >; lower (); NFC ();
But this seems quite problematic as I need to keep my original rule because it is also used by PHP's Transliterator object.
Is that a normal behavior in PyICU like not supporting some rules from original ICU or it is my mistake?
Thanks.