Really HARD topic to decide. Slugification aims at creating a string with correct balance between human readibility and URI compatibility... The whole literature around doing this, generally describes two approaches:
This results in HEAVY packages and somewhat magical translations not always obvious.
Escaping : escapes non-latin characters to comply with URI sepcs
too radical solution, and output slug can look funky or empty
J'aime la Crème Brulée 繁體中文 ş Д 🐎becoming:
In Troglio we promote another approach: leave output slug as close as possible to the input while helping with minimal corrections. The idea is to replace accents and diatrics, replace spaces by one '-', eliminate punctuation and leave the rest as-is.
J'aime la Crème Brulée 繁體中文 ş Д 🐎 should become:
> What You See Is What You Get : we only remove accents, diatrics, and punctuation. Then whitespaceS are replaced by one '-'. And everything is lowerCased. That's it.
> we do not want to arbitrarily delete/escape special characters and leave user short disoriented about the output
> it ultimately turns translation into user's responsibility: if it needs translation, the
permalink property is still editable to do so and will have priority over automatic slug. So one can always define
permalink = /this-is-my-final-manually-slugified-url.