Hi, I did further testing on the issue and found out that the problem occurs only when the locale that is set in LC_CTYPE (directly or via LANG) is a valid locale. For example the display of Hebrew will be wrong if LC_CTYPE is set to en_US but it will be correct when set to he, en, he_US or any other unrecognized locale. Further more when typing hebrew when LC_CTYPE is configured to a valid value, and not setting the text as "language hebrew" in LyX (that causes lyx to treat the Hebrew as English or the default language) the hebrew text is displayed right, but when marking it as hebrew in Lyx it displays wrong (as described in bug #3040). If you set the LC_CTPE to invalid value the Hebrew text marked as hebrew is displayed correctly but the one that isn't marked in Lyx as hebrew is displayed wrong (As should be excepted as it isn't marked as hebrew).
My guess is that when LC_CTYPE is set to a valid locale and you type hebrew (and don't mark it as hebrew in Lyx) Qt sorts the hebrew text when printed to the screen so it will be displayed correcty. But when the text is marked as Hebrew within Lyx, Lyx already sorts the text so it should displayed correcty, but when it prints it Qt recognizes it as hebrew and reverse the order of the letter (so in it's point of view the letter will be displayed correctly). To sum it up when the LC_CTYPE is set correcty Qt recognizes the hebrew text and when it's the hebrew text is marked as hebrew also Lyx recognizes it and both of them reverse the order of the letters. The solution in my point of view is to leave the correct display for Qt and remove the reversing of letters from Lyx. If someone will point me where the reversing of hebrew letters is done in the Lyx code I will try do it my self. I hope we shall solve this bug soon. Best Regargs, Guy Guy Rutenberg <[EMAIL PROTECTED]> writes:
Hi, The faulty environment variable is LC_CTYPE. when setting this variable (either directly or by setting the LANG) LyX doesn't handle hebrew text correctly. Do someone now when lyx looks at the LC_CTYPE and what effect it has when it's set in LyX? Regards, Guy On 1/4/07, Guy Rutenberg <[EMAIL PROTECTED]> wrote: > > Hi, > I can confirm that the bug is related to the environment variable, and > especially the ones that relate to the locale settings. > I couldn't solve the problem with only unsetting the LANG but I solved
it
> when I unset all the locale related variables. As this is not a nice > solution I will try to find out exactly which enviroment variable is
faulty,
> and report back. > > Thanks for helping, > Guy > > Dov Feldstern wrote: > > > What had been strange was that I (dov) was not seeing this problem, > > while Guy > > was, and we couldn't figure out why. I've finally been able to > > reconstruct this > > problem with: > > > > setenv LANG he_IL > > > > In other words, when LANG is *not* set, then the words are not > > reversed, but > > when it is set, then the words are reversed. So Guy --- try to unset > > this > > variable (and maybe also LANGAUGE, if it's set?) and see if that
helps.
> > > > Note, however, that it is important that we be able to have the > > variable set -- > > when it's not set, the menus do not display hebrew correctly... So
the
> > solution > > should be local to the painting, not just getting rid of this > > environment variable. > > > > >