Skip to content

[Bug]: Arabic Text Display error #3818

Description

@Insprion80

Hello,
I would like to report an issue related to RTL (Right-to-Left) text rendering in Enigma2, specifically when displaying Arabic text in eLabel-based widgets.

Observed behavior
When displaying long Arabic text (for example, TMDB movie overviews or translated EPG descriptions), the rendered output frequently exhibits incorrect layout behavior:
The reading order of wrapped lines is incorrect.
The logical flow of the paragraph is often lost after automatic wrapping.

Mixed Arabic/Latin text (movie titles, names, numbers, etc.) is not handled correctly.
In many cases, the visible text appears to start from the middle or end of the paragraph rather than from its beginning, giving the impression that the wrapped lines are laid out in reverse order.

The original UTF-8 text is correct before it is assigned to the widget. The issue only appears after the text is rendered by Enigma2.

What has been verified
The JSON source contains the complete overview in the correct logical order.
The same text is passed unchanged to the renderer.
No truncation or manual line reordering is performed by the plugin.

The issue only becomes visible after eLabel performs automatic wrapping and rendering.
Attempts to work around the problem

Several plugin-level workarounds have been tested, including:
Unicode RTL embedding markers (RLE/PDF)
Right-to-left marks (RLM)
Manual text preprocessing

Alternative wrapping logic
These approaches can improve some cases but cannot provide reliable results because the underlying rendering engine still performs its own line layout.

A similar issue has also been encountered in the EPG Translator plugin, where considerable effort was made to improve Arabic rendering from within the plugin. While those workarounds helped in some situations, they could not fully resolve the problem because the rendering behavior originates below the plugin level.
Suggestion

It may be worthwhile to review the RTL handling inside eLabel (or the underlying text layout implementation), particularly:
Unicode Bidirectional Algorithm (UAX #9) support.

RTL-aware word wrapping.
Mixed RTL/LTR paragraph handling.
Correct logical-to-visual line ordering after wrapping.

Improving RTL support at the Enigma2 rendering level would benefit all plugins and skins that display Arabic, Hebrew, Persian, or other RTL languages, rather than requiring each plugin to implement its own workarounds.

Thank you for your time and for maintaining Enigma2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions