On git master, run geany on RTL language, like Hebrew: `env LANG=he_IL.UTF-8 geany` than open some code-file.
You can see some parentheses in the wrong place in the line.
For example, this code: `gchar buf[16];` displaying as `gchar buf[16;]`. When you move the cursor to the ']' character the displaying change to the right way.
Another examples: The code `self->area_width` look like `self>-area_width`. The code `step[0] >= w` look like `step[0] => w`.
See screenshot.
![צילום מסך מ־2022-01-15 21-49-33](https://user-images.githubusercontent.com/2222697/149635823-cc0beb39-ed11-49...)
Unfortunately [Scintilla](https://www.scintilla.org/index.html), the editing widget Geany uses says this about RTL support "Scintilla provides only limited experimental support on Windows for right-to-left languages like Arabic and Hebrew. While text in these languages may appear correct, interaction with this text may not work correctly as occurs with other editors.".
You don't say what your system is, but it appears to be Linux.
It appears that on Linux using a RTL locale also confuses LTR text near closing brackets. Try with Scite (the reference editor for Scintilla) 5.1.6 should use the same Scintilla as Geany git and if it fails you could report it to Scintilla.
Hey do I have to sign any license for this contribution
Unfortunately [Scintilla](https://www.scintilla.org/index.html), the editing widget Geany uses says this about RTL support "Scintilla provides only limited experimental support on Windows for right-to-left languages like Arabic and Hebrew. While text in these languages may appear correct, interaction with this text may not work correctly as occurs with other editors.".
You don't say what your system is, but it appears to be Linux.
It appears that on Linux using a RTL locale also confuses LTR text near closing brackets. Try with Scite (the reference editor for Scintilla) 5.1.6 should use the same Scintilla as Geany git and if it fails you could report it to Scintilla.
I tested geany from git master on archlinux. This is a new bug on geany git master. It dosn't happen with geany's stable version (1.38).
In fact, it didn't happen to me in the last 10 years using geany in Hebrew.
I tested geany from git master on archlinux. This is a new bug on geany git master.
Which is why I suggested trying Scite 5.1.6, because there has been a big jump in Scintilla version between 1.38 and git head.
Hey can you please assign me this issue.I want to work on it.
I opened a bug in SciTE bugzilla: [2309](https://sourceforge.net/p/scintilla/bugs/2309/).
Hmm, I just digging in the past and I discover the same bug in 2012, here in [#64](https://github.com/geany/geany/pull/64) and in [scite #1477](https://sourceforge.net/p/scintilla/bugs/1477/).
The way we solved this problem was to force the sci widget to be left to right by gtk_widget_set_direction(). This code still in [sci code](https://sourceforge.net/p/scintilla/code/ci/default/tree/gtk/ScintillaGTK.cx...) and in [geany code](https://git.geany.org/geany/tree/src/editor.c#n4857).
So I have no idea why we see this bug again.
@yoseforb as Neil notes, Scintilla does not deliberately support any directionality other than LTR on the GTK backend, but you have an RTL locale set, which as Neil explained, seems to activate bidirectional code for neutral direction characters[^1] despite the setting on the widget (remember Scintilla _is_ the widget, its the code using that setting), it was possibly just lucky it worked in the past, but Geany has advanced two major Scintilla versions between 1.38 and git so unrelated changes in Scintilla such as the activation of the experimental RTL support for other platforms may have triggered the problem.
Note that Geany always defaults to the equivalent of what the `code.page=65001` setting in Scite does, so thats probably why Geany does not crash.
Hopefully Neil will fix Scintilla to display mixed LTR and neutral characters in RTL locales or you will have to always run Geany in an LTR locale.
[^1]: your file may not have just LTR characters in it, (I can't access the UCD for some reason ATM to check), but Neil was saying some characters were neutral not LTR so I'm assuming he is right
@Lavesh-Saluja there is nothing to work, @yoseforb has kindly already opened the bug upstream, but if you have any constructive contributions then make them.
github-comments@lists.geany.org