Skip to content

mixing right-to-left and left-to-right text #392

Closed

Description

@GoogleCodeExporter
This is both a defect report and an enhancement request.

I am interested in displaying right-to-left text and left-to-right text on the 
same line. 

1) The following examples show that this feature is not yet fully supported:

  printf "1) 1Ki  \xd7\xa0\xd7\x90\xd7\x9e"

displays "11 (Ki ..." instead of "1) 1Ki ..."

  printf "\xd7\xa0\xd7\x90\xd7\x9e Ps (1)"

displays "... (Ps (1" instead of "... Ps (1)".

This defect has to do with the way text is displayed. When I copy the text 
displayed by mintty to another application (wordpad) I get the correct results 
"1) 1Ki ..." and "... Ps (1)". 

I am using the default settings of mintty, except for using the Courier New, 
bold, 11-point font. The variable LANG is set to en_US.UTF-8.

2) I think that the present feature of mintty that automatically switches 
between right-to-left and left-to-right modes is very helpful when typing text 
directly into the terminal window. However, this feature might not be as 
convenient when writing programs that display text to the terminal window, 
since a program would have to account for the terminal switching between these 
two modes in order to get the text displayed correctly. 

- It would be helpful to have some escape sequences, or some other way, to 
disable the automatic switch between right-to-left and left-to-right mode.

- It would be nice also to have a way to tell the terminal the direction in 
which the text should be displayed. This of course should override the function 
of the terminal that determines automatically the direction of the text. 

Original issue reported on code.google.com by [email protected] on 14 Jun 2013 at 4:59

Activity

  1. mintty commented on May 2, 2016

    @mintty
    Owner

    For the records: There are Unicode characters defined to provide such control.
    Implementation would require enhancement of the minibidi module, or maybe its replacement with freebidi might solve the issue.

  2. mintty commented on Apr 12, 2017

    @mintty
    Owner

    While implementing partial support for bidi markers, it became apparent that this is not sufficient to control absolute positioning. A switching sequence may be added.

  3. mintty commented on Apr 13, 2017

    @mintty
    Owner

    Released 2.7.6.

  4. mintty commented on May 19, 2017

    @mintty
    Owner

    Released 2.7.7.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions