Changes between Version 11 and Version 12 of Ticket #4138, comment 16


Ignore:
Timestamp:
10/28/21 12:58:34 (3 years ago)
Author:
ZGMxYWFh
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4138, comment 16

    v11 v12  
    1414Many years ago, many people thought the RTL issue could be settled by simply mirroring the order of characters in a line. Have the last character became the 1^st^ character, the 2^nd^ to last character became the 2^nd^ character, and so on. Problem solved. It turned out this is far more complex than that. Possibly, but perhaps not limited to, due to having a mixture of LTR and RTL writing in the same line. Which is why they created quite a complex algorithm. As can be seen at [https://en.wikipedia.org/wiki/Bidirectional_text Bidirectional text], there are strong characters. Weak characters. Neutral characters. Strong direction of the line. Weak  direction for only some parts of the line. Artificial characters for directional enforcement. And some more definitions that are used to state, and implement, the bidi algorithm. My main point here is that it could be that the algorithm can not handle everything by itself. It must interact with the user. Sometimes it should be hinted by the user. I think in our case, that user are the MC programmers. I think the MC program must control what libfribidi does. I assume, and hope, the libfribidi, and the terminal, have appropriate hooks, or API. An example for the need for such an API might be a human user writing a bidi document at some word processing software, for example LibreOffice Writer. Even people who are doing only moderate volume of work on such bidi documents might recognize that sometimes the LibreOffice Writer software does not put the characters in the right place. They have to intervene. Here is a picture of LibreOffice 7.2.2.2 Writer intervene menu: \\[[Image(LibreOfficeWriterFormattingMenu.jpg)]] \\. I obtained it by {{{Insert ⇒ Formatting Mark menu}}}. This exact menu probably can not be seen in LibreOffice installations of Latin only languages speaking users. One has to {{{Tools ⇒ Options… ⇒ Language Settings ⇒ Languages ⇒ Have a tick for Complex text layout, and select an RTL language}}}. (It could be any language in the drop down languages menu there will do.) Possibly coupled by {{{Tools ⇒ Options… ⇒ Language Settings ⇒ Complex Text Layout ⇒ Cursor Control Movement: Logical}}}. This is the libreOffice Writer way to let user intervene. I do not know how many entries in the picture are bidi related. But even if only 3 entries are bidi related, I think it is still should not be taken lightly. Not only that. Users who tried to use those entries might be aware that it is not always that easy as picking the right entry from the list and inserting it into their document. Sometimes they have to use trial and error. The reason for their need for trial and error is not because the algorithm is poor. Rather, it is because they only superficially understand the algorithm. Which is why they sometimes don’t know which entry they have to pick, and what is the exact point in the line they should insert it in. 
    1515 
    16 My bottom line is that, in my opinion, MC probably needs a programmer who knows the bidi algorithm to fix the column swapping, and the justification of the file names. And I am not sure there are not more issues. Such as locale that put dates, perhaps name of months, in an RTL language. The knowledge of the bidi algorithm will probably help such a programmer deal with libfribidi API, and what some other components of the terminal might do with that API. With the result that MC could provide the right hints for libfribidi where appropriate. And who knows. Perhaps bugs, or needs for changing the API, will emerge. 
     16My bottom line is that, in my opinion, MC probably needs a programmer who knows the bidi algorithm to fix the column swapping, and the justification of the file names. And I am not sure there are not more issues. Such as locale that put dates, perhaps name of months, in an RTL language. The knowledge of the bidi algorithm will probably help such a programmer deal with libfribidi API, and what some other components of the terminal might do with that API. With the result that MC could provide the right hints for libfribidi where appropriate. And who knows. Perhaps bugs, or needs for modifications of the API, will emerge. 
    1717 
    18 Rethinking about what looks to me your persistence to ignore the justification issue. Perhaps you are trying to imply the problem should be solved by smaller, measurable, steps. As if you are saying: let us attempt to solve just the swapping of columns issue that were raised here. Forget, for now, about possible month names in an RTL language. Or have justification of the columns in a way that is expected by readers of RTL languages. Hopefully, that will take us to a better position. And then we will see how to continue. In that case, perhaps the first step should be for MC to insert an LTR forcing artificial character at the end of each column. That is, in each column, and for each line of that column, MC will insert an RTL forcing artificial character. Puting that in other words: if today MC has 
     18Rethinking about what looks to me your persistence to ignore the justification issue. Perhaps you are trying to imply the problem should be solved by smaller, measurable, steps. As if you are saying: let us attempt to solve just the swapping of columns issue that were raised here. Forget, for now, about possible month names in an RTL language. Or have justification of the columns in a way that is expected by readers of RTL languages. Hopefully, that will take us to a better position. And then we will see how to continue. In that case, perhaps the first step should be for MC to insert an LTR enforcing artificial character at the end of each column. That is, in each column, and for each line of that column, MC will insert an RTL enforcing artificial character. Putting that in other words: if today MC has 
    1919 
    2020        | XXXXXXXX | XXXXXXXX | XXXXXXXX | 
    2121        | XXXXXXXX | XXXXXXXX | XXXXXXXX | 
    2222 
    23 Where X is any character, of any language, including white space. And a bar is the columns separating character, then after the change MC will have 
     23Where X is any character, of any language, including white space. And a bar is the columns separator character, then after the change MC will have 
    2424 
    2525        F | XXXXXXXX F | XXXXXXXX F | XXXXXXXX F |