Andrei Popov wrote:

> Hello All.
>
> I'm writing a document in Russian using LyX and have
> the following problem: My labels that contain Russian
> characters are shown not with cp1251 like they're supposed
> to, but with iso-8859-1 (aka latin1). This is both
> with QT and Xforms frontends.

Hi, Andrei.

I suspect that this problem comes down to a question of what encoding
is seen by the GUI toolkit (ru_RU.cp1251 I suppose) and what encoding
is used by the LyX document (depends on the language settings in the
Layout->Document dialog.)

I suspect that we're not very clever at changing the string in one
8bit encoding to another 8bit encoding.

> The wrong encoding is shown in the rectangular box
> that represents a label and can be opened to edit the
> label.
>
> The dvi/pdf files output fine, it's just an annoying
> aesthetic issue.
>
> Now, with lyx-qt I can set the screen fonts only, which
> is clearly not what I want. With xforms, we have some
> additional options, like Menu Font and Popup Font,
> and even Encoding for them. I set them all to valid
> fonts that contain the cp1251 encoding, and set the
> Encoding field to "cp1251" or "microsoft-cp1251" --
> and all to no avail. The labels are still shown wrong.
>
> Questions:
>
> 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.

> 2. I noticed that xforms settings like "Menu/Popup
> Font" and "Encoding" go into my .lyxrc, which is used
> by both qt and xforms frontends. Why doesn't lyx-qt
> have the same font and encoding options as lyx-xforms?
> is it smarter in any way? Is lyx-qt actually _using_
> these additional settings?

No, it's not. These things are used only by the xforms frontend. Qt
uses the external qconfig tool to control such things in a consistent
way for all Qt apps.

>
> Thanks in advance for any pointers.
>
> PS: I think anyone who's using any encoding other than
> pure iso-8859-1 can try and input some his/her
> native-language-specific-chars 
> in labels, and see if the label now shows garbage.
> I mean, it doesn't matter if it's Russian, Belarusian,
> Polish, Ukrainian or Hungarian or any other eastern
> European language.

I don't think it's much consolation, but I think that we've always had
problems mixing encodings like this.

> WBR, Andrei Popov
-- 
Angus


Reply via email to