Malum

Malum

3M Downloads

[BUG] Book renderer shows Unicode control character which shouldn't be rendered

kkylern opened this issue · 0 comments

commented

Mod's version

1.20.1-1.6.2 (I haven't checked, but I think it can occur for any newer version)

Issue

Malum's ‎‎book renderer shows \u200e Unicode control character (it should be invisible) after guillemets (« and »), which are considered primary symbols for quotation marks over basic latin quotation mark in many languages.

Thoughts

I think it happens because of one specific property of guillimets. The symbol is used not only in Left-to-Right languages (Russian, French and etc.) but is used in Right-to-Left languages as well (Arabic).

\u200E symbol ensures, that the text is rendered in right direction, but the symbol itself, of course, shouldn't be rendered.

Solutions I see:

  1. Clean text from added \u200e (LRM) and \u200f (RLM) as I don't see translations in other languages using guillimets as much (if they do at all) as translations in Russian
  2. Handle characters (\u200e in this case) that should be invisible

What doesn't work:

  1. Workaround: changing guillimets to their unicode (\u00ab and \u00bb). If space or end of the line occurs after guillimet unicode, \u200e would still show up.

Examples of control character occuring

№1

Image

"malum.gui.book.entry.page.text.introduction.1": "«‎В нашем мире каждое живое существо имеет душу. Эта душа — это сознание, что оживляет тело, и точка встречи между материей и магией. Они представляют наше существование; как тело представлено физическому миру, так и душа представлена духовному.»‎",

№2

Image

"malum.gui.book.entry.page.text.spirit_crystals.3": "Эти энергии, как уже отмечалось, имеют разные «‎частоты». Сущность, горящая светом, будет иметь душу, отражающую это сияние, а сущность, склонная к адаптации, будет иметь душу, столь же податливую, как и она сама. Иногда энергия ничем не выделяется и оставляет лишь чистый импульс творения. Этот тип кристалла требует дальнейшего изучения.",