Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)
Andrei Popov wrote: I suspect that this problem comes down to a question of what encoding is seen by the GUI toolkit (ru_RU.cp1251 I suppose) The locale is ru_RU.cp1251, and the keyboard layouts work via XKB, which, yes, allows to input in cp1251. and what encoding is used by the LyX document (depends on the language settings in the Layout-Document dialog.) Of course, the doc language is also set to Russian (encoding to cp1251), and in the encodings file in my ~/.lyx I have also mapped Russian to cp1251, otherwise it wouldn't work Then you've exhausted my limited knowledge on the subject. Sorry. You might search the archives for Kuba Ober. He's got things to work with Cyrillic encodings in the past I believe. http://marc.theaimsgroup.com/?l=lyx-develw=2r=1s=Kuba+Ober (by the way, the value of this file is not mentioned in the documentation anywhere, and it should, imho :) 1. Do labels account as popups, and should the above settings have worked in principle? If not, how can I explicitly set the font used for labels? You can't. I think that we don't do anything very clever when taking the content from the LyX screen and passing it to the GUI library that displays the string in a dialog. So I take it it's a LyX problem, not a toolkit-related one, and LyX is just programmed this way, then? Sort of. The problem is really that the frontend toolkits (at least Qt and Gtk) are unicode-aware and LyX's core isn't yet. If it were then all these encoding problems would just dissapear. Lars' big plan for the 1.5 series is a unicoded LyX. Still, is it possible that the GTK frontend will be without this flaw? shrugIf someone were to write the clever code for the Gtk frontend, then yes. Otherwise, it'll behave exactly like the other frontends in this regard.\shrug (All this presumes that I know what I'm talking about of course ;-)) Qt uses the external qconfig tool to control such things in a ^^^ consistent way for all Qt apps. qtconfig, probably? Right. Probably. I don't think it's much consolation, but I think that we've always had problems mixing encodings like this. Well, thanks for the explanation, this problem is a bit annoying, but it's definitely not enough to put me away from LyX/LaTeX =)) What really _is_ annoying, is that I have a similar problem with ERT. This time, I not only see latin1-garbage in rectangular boxes that represent ERTs with Russian in it, I also can't see Russian when I try _inputting_ it into the box. It shows again as latin1. So I have to type blind and hope for the best. Sorry, I don't understand. You input ERT on the LyX screen, no? Oh, you mean in the preamble? (Layout-Documents dialog) Angus, maybe it's possible to set the font for ERT, again, explicitly? Or, would it be possible to easily patch LyX so that an encoding of my choice could be specified and hardcoded into labels and ERTs?? The best way to fix a problem is to fix it yourself. You're definitely more of an expert in these things than I am. (Typically English: I speak English badly and anything else not at all.) I'm no programmer at all, but if it's a matter of replacing some_encoding with my_encoding in some *.h file, I'd giev it a try, at least for the sake of ERTs. Unfortunately, encoding stuff tends to be quite difficult to get right. -- Angus
Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)
Andrei Popov wrote: I suspect that this problem comes down to a question of what encoding is seen by the GUI toolkit (ru_RU.cp1251 I suppose) The locale is ru_RU.cp1251, and the keyboard layouts work via XKB, which, yes, allows to input in cp1251. and what encoding is used by the LyX document (depends on the language settings in the Layout-Document dialog.) Of course, the doc language is also set to Russian (encoding to cp1251), and in the encodings file in my ~/.lyx I have also mapped Russian to cp1251, otherwise it wouldn't work Then you've exhausted my limited knowledge on the subject. Sorry. You might search the archives for Kuba Ober. He's got things to work with Cyrillic encodings in the past I believe. http://marc.theaimsgroup.com/?l=lyx-develw=2r=1s=Kuba+Ober (by the way, the value of this file is not mentioned in the documentation anywhere, and it should, imho :) 1. Do labels account as popups, and should the above settings have worked in principle? If not, how can I explicitly set the font used for labels? You can't. I think that we don't do anything very clever when taking the content from the LyX screen and passing it to the GUI library that displays the string in a dialog. So I take it it's a LyX problem, not a toolkit-related one, and LyX is just programmed this way, then? Sort of. The problem is really that the frontend toolkits (at least Qt and Gtk) are unicode-aware and LyX's core isn't yet. If it were then all these encoding problems would just dissapear. Lars' big plan for the 1.5 series is a unicoded LyX. Still, is it possible that the GTK frontend will be without this flaw? shrugIf someone were to write the clever code for the Gtk frontend, then yes. Otherwise, it'll behave exactly like the other frontends in this regard.\shrug (All this presumes that I know what I'm talking about of course ;-)) Qt uses the external qconfig tool to control such things in a ^^^ consistent way for all Qt apps. qtconfig, probably? Right. Probably. I don't think it's much consolation, but I think that we've always had problems mixing encodings like this. Well, thanks for the explanation, this problem is a bit annoying, but it's definitely not enough to put me away from LyX/LaTeX =)) What really _is_ annoying, is that I have a similar problem with ERT. This time, I not only see latin1-garbage in rectangular boxes that represent ERTs with Russian in it, I also can't see Russian when I try _inputting_ it into the box. It shows again as latin1. So I have to type blind and hope for the best. Sorry, I don't understand. You input ERT on the LyX screen, no? Oh, you mean in the preamble? (Layout-Documents dialog) Angus, maybe it's possible to set the font for ERT, again, explicitly? Or, would it be possible to easily patch LyX so that an encoding of my choice could be specified and hardcoded into labels and ERTs?? The best way to fix a problem is to fix it yourself. You're definitely more of an expert in these things than I am. (Typically English: I speak English badly and anything else not at all.) I'm no programmer at all, but if it's a matter of replacing some_encoding with my_encoding in some *.h file, I'd giev it a try, at least for the sake of ERTs. Unfortunately, encoding stuff tends to be quite difficult to get right. -- Angus
Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)
Andrei Popov wrote: >> I suspect that this problem comes down to a question of >> what encoding is seen by the GUI toolkit (ru_RU.cp1251 I >> suppose) > The locale is ru_RU.cp1251, and the keyboard layouts work via > XKB, which, yes, allows to input in cp1251. >> and what encoding is used by the LyX document (depends on >> the language settings in the Layout->>Document dialog.) > Of course, the doc language is also set to Russian > (encoding to cp1251), and in the encodings file in my > ~/.lyx I have also mapped Russian to cp1251, otherwise it > wouldn't work Then you've exhausted my limited knowledge on the subject. Sorry. You might search the archives for "Kuba Ober". He's got things to work with Cyrillic encodings in the past I believe. http://marc.theaimsgroup.com/?l=lyx-devel=2=1=Kuba+Ober > (by the way, the value of this file is not > mentioned in the documentation anywhere, and it should, imho :) >>> 1. Do labels account as popups, and should the above settings >>> have worked in principle? If not, how can I explicitly set the >>> font used for labels? >> You can't. I think that we don't do anything very clever when >> taking the content from the LyX screen and passing it to the GUI >> library that displays the string in a dialog. > So I take it it's a LyX problem, not a toolkit-related one, > and LyX is just programmed this way, then? Sort of. The problem is really that the frontend toolkits (at least Qt and Gtk) are unicode-aware and LyX's core isn't yet. If it were then all these encoding problems would just dissapear. Lars' big plan for the 1.5 series is a unicoded LyX. > Still, is it possible that the GTK frontend will be without this > flaw? If someone were to write the clever code for the Gtk frontend, then yes. Otherwise, it'll behave exactly like the other frontends in this regard.<\shrug> (All this presumes that I know what I'm talking about of course ;-)) >> Qt uses the external qconfig tool to control such things in a > ^^^ >> consistent way for all Qt apps. > qtconfig, probably? Right. Probably. >> I don't think it's much consolation, but I think that we've >> always had problems mixing encodings like this. > Well, thanks for the explanation, this problem is a bit annoying, > but it's definitely not enough to put me away from LyX/LaTeX =)) > What really _is_ annoying, is that I have a similar problem with > ERT. This time, I not only see latin1-garbage in rectangular > boxes that represent ERTs with Russian in it, I also can't see > Russian when I try _inputting_ it into the box. It shows again > as latin1. So I have to type blind and hope for the best. Sorry, I don't understand. You input ERT on the LyX screen, no? Oh, you mean in the preamble? (Layout->Documents dialog) > Angus, maybe it's possible to set the font for ERT, again, > explicitly? > Or, would it be possible to easily patch LyX so that an encoding of > my choice could be specified and hardcoded into labels and ERTs?? The best way to fix a problem is to fix it yourself. You're definitely more of an expert in these things than I am. (Typically English: I speak English badly and anything else not at all.) > I'm no programmer at all, but if it's a matter of replacing > "some_encoding" with "my_encoding" in some *.h file, I'd giev it a > try, at least for the sake of ERTs. Unfortunately, encoding stuff tends to be quite difficult to get right. -- Angus