I try to use Character Replacement Strategy for replace cyrillic symbols to latin.
this is ok for case: A->a, Б->b, В->v, Г->g etc.
but is no propertly work for case when inserting rules for replace special chars, for example “space”->“_”, and next attempt to insert a new rule breaks the data structure, see screenshot:
What’s going on? Where is a problem?
Windows Server + Tomacat 9 + Postgree 11(Encoding: UTF-8, collation:Russian_Russia.1251, character type:Russian_Russia.1251)
There are other ways to convert Cyrillic to Latin for URLs?
This case work only for latin, not for cirillyc symbols:
“remove any special characters: only the latin alphabet (26 letters) without accents, the numbers and the character “-” (dash) are accepted.”
Hmm that’s right. Do you have an idea how we could improve that? That would be probably a good idea to have a “Preformatted names” strategy that would work for cyrillic symbols.
Yes! “Preformatted names strategy for cyrillic alfabet” is the best solution for my case.
With next actions: Convert cyrillic alfabet into latin alfabet, and remove any special characters and without accents, the numbers and the character “-” (dash) are accepted, " " (space) convert to “_” (underscore).
So the specific data of the Character replacement strategy are stored in the xobject of page XWiki.EntityNameValidation.Configuration, you can try to perform changes directly there.
so I actually investigated on this issue, and apparently the issue is not at all related to the cyrillic alphabet but to empty values. From what I see on your first message, on image 4 you create a replacement strategy from ~ to “None” (empty value), and to my knowledge that’s what messes up your character replacement strategy.
I’m providing a fix for that for both next stable and LTS versions of XWiki.