Skip to content

Right to left text confuses REPL arrow-up cursor location #16568

@jiahao

Description

@jiahao

The REPL gets confused when working with text literals from right-to-left languages, like Arabic.

For example, writing this string of randomly generated Arabic text into the REPL causes it to line wrap. The first line is rendered left to right, and subsequent lines from right to left. (note that GitHub's rendering garbles the text too)

julia> "هذه ان المحيط البرية وانتهاءً. شدّت فمرّ شاسعة كل بها. بعد عل أراضي فرنسية, ان لعدم المضي حتى. فرنسية المتحدة الأوربيين وفي مع, اليها وإقامة من لكل. المارق اسبوعين التخطيط أخر عل, ما موالية محاولات لبولندا، الا, ما قائمة إنطلاق لها. سبتمب"

"هذه ان المحيط البرية وانتهاءً. شدّت فمرّ شاسعة كل بها. بعد عل أراضي فرنسية, ان لعدم المضي حتى. فرنسية المتحدة الأوربيين وفي مع, اليها وإقامة من لكل. المارق اسبوعين التخطيط أخر عل, ما موالية محاولات لبولندا، الا, ما قائمة إنطلاق لها. سبتمب"

julia>

If at the next interactive prompt I press the up arrow key, the cursor is placed incorrectly (relative to the right-to-left rendering order of the current line) at the rightmost side of the line, even though insertions and deletions happen correctly at the end of the line (rendered on the leftmost side).

Screenshot of what I see in my REPL on Julia 0.4, OSX 10.11 (I typed <UP>=1 at the second prompt):

screenshot 2016-05-24 21 02 24

Metadata

Metadata

Assignees

No one assigned

    Labels

    REPLJulia's REPL (Read Eval Print Loop)unicodeRelated to unicode characters and encodings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions