Changes between Version 8 and Version 9 of Ticket #4138, comment 16


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4138, comment 16

    v8 v9  
    1212As I wrote above, even though it looks like the swapping columns depends on the listing format, I think this is not the full picture. Do note that even when the swapping columns is not seen, the wrong justification of Hebrew file names is there. The reason is that the problem is, probably, not only the swapping columns. I suspect it is also about the justification of the file names. In order to see that, I think we should talk about bidi in more length. I have already wrote that I suspect the justification of the names, and the swapping columns issue, are related. I haven’t proved that. I also suspect, but haven’t proved, the justification problem is bidi related. If that is not enough, my knowledge about bidi is poor. Still, I hope that if you follow, you will see that my suspicions might stand on solid ground. 
    1313 
    14 Many 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 n our case, this user is the MC programmer. 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 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. 
     14Many 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, this user is the MC programmer. 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 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 
    1616My 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.