Skip to content

Unicode text input is broken with CodeMirror 4.8 (needs upgrade) #223

Closed

Description

@Goudarz

Hi, While working on an Arabic-script translation for TryRuby (PR #222 – Persian),
I noticed that text input in the editor is unreliable for Unicode content.

TryRuby currently uses CodeMirror 4.8, which has known issues with Unicode/BiDi text handling. This can result in incorrect character order and cursor behavior (e.g. Persian text rendering in reverse).

This is not a CSS or direction issue, but a limitation of the old CodeMirror 4.x text insertion logic. This directly affects the usability of Arabic-script languages.

Suggestion: upgrade CodeMirror to a newer version (5.x or later).
Even a minor upgrade should significantly improve Unicode input handling.

Activity

  1. Goudarz commented on Jan 6, 2026

    @Goudarz
    Author

    CC @hsbt 🙏🏻

  2. Goudarz commented on Oct 5, 2026

    @Goudarz
    Author

    CC @hsbt 🙏🏻

  3. hsbt commented on Oct 6, 2026

    @hsbt
    Member

    Fixed in #254, which is now live on https://try.ruby-lang.org/. The cause was a Bootstrap style rule rather than CodeMirror 4.8, so the editor did not need an upgrade. If Persian text still looks wrong in your browser, please let me know.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions