Re[4]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
 You  might  search  the archives for Kuba Ober. He's got things to
 workwith   Cyrillic   encodings   in   the   past   I   believe.
 http://marc.theaimsgroup.com/?l=lyx-develw=2r=1s=Kuba+Ober
OK, thanks, I'll try that.

 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?
Yes.  I  open an ERT box, I type some latex stuff, and I need to input
some  Russian.  Only,  I  don't  see my Russian chars, I only see some
latin1 garbage.

An  update:  This  only happens with lyx-qt now, with xforms I seem to
have  solved  this  AND  the previous label problem with the following
code I found on Google and adapted to my needs:

-=-=-=-=-=-=-=-=-=-=-=[ Begin Clipboard ]=-=-=-=-=-=-=-=-=-=-=

\screen_font_roman -*-times
\screen_font_sans -microsoft-tahoma
\screen_font_typewriter -*-courier
\screen_font_encoding cp1251
\screen_font_popup -*-helvetica-*-r
\screen_font_menu -*-helvetica-*-r
\screen_font_encoding_menu cp1251

-=-=-=-=-=-=-=-=-=-=-=-[ End Clipboard ]-=-=-=-=-=-=-=-=-=-=-=

With  the  above  in  .lyxrc,  the  Russian  chars are visible in both
on-screen ERT boxes and labels. Only in xforms, though, which is bound
to be dropped some time soon, right?

OK,  maybe  this  will  still  be  of some use to anyone with the same
problem.

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Angus Leeming

Andrei Popov wrote:

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?


A. The penny drops. (I start to understand.)

We rely on the frontend toolkits to supply us with the fonts we ask for. 
XForms does as we ask, but Qt occassionally lies to us. I'm hazy about the 
details but there are comments to this effect in qfont_loader.C:


http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/frontends/qt2/qfont_loader.C?rev=1.27.2.8only_with_tag=BRANCH_1_3_Xcontent-type=text/vnd.viewcvs-markup

You might like to drop either John Levon (who wrote this code) or Kuba Ober 
(who has used Cyrillic fonts with success in the past) a line.


  levon () movementarian ! org
  kuba () mareimbrium ! org

Regards,
Angus



Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
 However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
 lyx-qt  apparently  not.  How is it possible, if they're both based on
 the same code?

 We rely on the frontend toolkits to supply us with the fonts we ask
 for. XForms does as we ask, but Qt occassionally lies to us.

 You might like to drop either John Levon (who wrote this code) or
 Kuba Ober (who has used Cyrillic fonts with success in the past) a
 line.

levon () movementarian ! org
kuba () mareimbrium ! org

Thanks, Angus. I'll verify again at home this problem with QT and
check if it really went away in Xforms, and then try to reach for the
guys.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re[4]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
 You  might  search  the archives for Kuba Ober. He's got things to
 workwith   Cyrillic   encodings   in   the   past   I   believe.
 http://marc.theaimsgroup.com/?l=lyx-develw=2r=1s=Kuba+Ober
OK, thanks, I'll try that.

 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?
Yes.  I  open an ERT box, I type some latex stuff, and I need to input
some  Russian.  Only,  I  don't  see my Russian chars, I only see some
latin1 garbage.

An  update:  This  only happens with lyx-qt now, with xforms I seem to
have  solved  this  AND  the previous label problem with the following
code I found on Google and adapted to my needs:

-=-=-=-=-=-=-=-=-=-=-=[ Begin Clipboard ]=-=-=-=-=-=-=-=-=-=-=

\screen_font_roman -*-times
\screen_font_sans -microsoft-tahoma
\screen_font_typewriter -*-courier
\screen_font_encoding cp1251
\screen_font_popup -*-helvetica-*-r
\screen_font_menu -*-helvetica-*-r
\screen_font_encoding_menu cp1251

-=-=-=-=-=-=-=-=-=-=-=-[ End Clipboard ]-=-=-=-=-=-=-=-=-=-=-=

With  the  above  in  .lyxrc,  the  Russian  chars are visible in both
on-screen ERT boxes and labels. Only in xforms, though, which is bound
to be dropped some time soon, right?

OK,  maybe  this  will  still  be  of some use to anyone with the same
problem.

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Angus Leeming

Andrei Popov wrote:

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?


A. The penny drops. (I start to understand.)

We rely on the frontend toolkits to supply us with the fonts we ask for. 
XForms does as we ask, but Qt occassionally lies to us. I'm hazy about the 
details but there are comments to this effect in qfont_loader.C:


http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/frontends/qt2/qfont_loader.C?rev=1.27.2.8only_with_tag=BRANCH_1_3_Xcontent-type=text/vnd.viewcvs-markup

You might like to drop either John Levon (who wrote this code) or Kuba Ober 
(who has used Cyrillic fonts with success in the past) a line.


  levon () movementarian ! org
  kuba () mareimbrium ! org

Regards,
Angus



Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
 However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
 lyx-qt  apparently  not.  How is it possible, if they're both based on
 the same code?

 We rely on the frontend toolkits to supply us with the fonts we ask
 for. XForms does as we ask, but Qt occassionally lies to us.

 You might like to drop either John Levon (who wrote this code) or
 Kuba Ober (who has used Cyrillic fonts with success in the past) a
 line.

levon () movementarian ! org
kuba () mareimbrium ! org

Thanks, Angus. I'll verify again at home this problem with QT and
check if it really went away in Xforms, and then try to reach for the
guys.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re[4]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
> You  might  search  the archives for "Kuba Ober". He's got things to
> workwith   Cyrillic   encodings   in   the   past   I   believe.
> http://marc.theaimsgroup.com/?l=lyx-devel=2=1=Kuba+Ober
OK, thanks, I'll try that.

>> 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?
Yes.  I  open an ERT box, I type some latex stuff, and I need to input
some  Russian.  Only,  I  don't  see my Russian chars, I only see some
latin1 garbage.

An  update:  This  only happens with lyx-qt now, with xforms I seem to
have  solved  this  AND  the previous label problem with the following
code I found on Google and adapted to my needs:

-=-=-=-=-=-=-=-=-=-=-=[ Begin Clipboard ]=-=-=-=-=-=-=-=-=-=-=

\screen_font_roman "-*-times"
\screen_font_sans "-microsoft-tahoma"
\screen_font_typewriter "-*-courier"
\screen_font_encoding "cp1251"
\screen_font_popup "-*-helvetica-*-r"
\screen_font_menu "-*-helvetica-*-r"
\screen_font_encoding_menu "cp1251"

-=-=-=-=-=-=-=-=-=-=-=-[ End Clipboard ]-=-=-=-=-=-=-=-=-=-=-=

With  the  above  in  .lyxrc,  the  Russian  chars are visible in both
on-screen ERT boxes and labels. Only in xforms, though, which is bound
to be dropped some time soon, right?

OK,  maybe  this  will  still  be  of some use to anyone with the same
problem.

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Angus Leeming

Andrei Popov wrote:

However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
lyx-qt  apparently  not.  How is it possible, if they're both based on
the same code?


A. The penny drops. (I start to understand.)

We rely on the frontend toolkits to supply us with the fonts we ask for. 
XForms does as we ask, but Qt occassionally lies to us. I'm hazy about the 
details but there are comments to this effect in qfont_loader.C:


http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/frontends/qt2/qfont_loader.C?rev=1.27.2.8_with_tag=BRANCH_1_3_X=text/vnd.viewcvs-markup

You might like to drop either John Levon (who wrote this code) or Kuba Ober 
(who has used Cyrillic fonts with success in the past) a line.


  levon () movementarian ! org
  kuba () mareimbrium ! org

Regards,
Angus



Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-29 Thread Andrei Popov
>> However,  I'm  at  a  loss  -- lyx-xforms appears to be fixable, while
>> lyx-qt  apparently  not.  How is it possible, if they're both based on
>> the same code?

> We rely on the frontend toolkits to supply us with the fonts we ask
> for. XForms does as we ask, but Qt occassionally lies to us.

> You might like to drop either John Levon (who wrote this code) or
> Kuba Ober (who has used Cyrillic fonts with success in the past) a
> line.

>levon () movementarian ! org
>kuba () mareimbrium ! org

Thanks, Angus. I'll verify again at home this problem with QT and
check if it really went away in Xforms, and then try to reach for the
guys.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Label font -- wrong encoding

2005-11-28 Thread Andrei Popov
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.

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?

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?

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.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian



Re: Label font -- wrong encoding

2005-11-28 Thread Angus Leeming
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




Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Andrei Popov
Hello Angus,

Monday, November 28, 2005, 2:05:17 PM, you 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 (by the way, the value
of  this  file  is not mentioned in the documentation anywhere, and it
should, imho :)

 I  suspect  that we're not very clever at changing the string in one
 8bit encoding to another 8bit encoding.
 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?

Still, is it possible that the GTK frontend will be without this flaw?

 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.
So it's no problem that all these settings are in my .lyxrc, for both
the frontends. Good.

 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.
qtconfig, 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.

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??

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.

--
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Angus Leeming
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




Label font -- wrong encoding

2005-11-28 Thread Andrei Popov
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.

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?

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?

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.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian



Re: Label font -- wrong encoding

2005-11-28 Thread Angus Leeming
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




Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Andrei Popov
Hello Angus,

Monday, November 28, 2005, 2:05:17 PM, you 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 (by the way, the value
of  this  file  is not mentioned in the documentation anywhere, and it
should, imho :)

 I  suspect  that we're not very clever at changing the string in one
 8bit encoding to another 8bit encoding.
 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?

Still, is it possible that the GTK frontend will be without this flaw?

 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.
So it's no problem that all these settings are in my .lyxrc, for both
the frontends. Good.

 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.
qtconfig, 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.

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??

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.

--
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Angus Leeming
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




Label font -- wrong encoding

2005-11-28 Thread Andrei Popov
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.

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?

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?

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.

-- 
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian



Re: Label font -- wrong encoding

2005-11-28 Thread Angus Leeming
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




Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Andrei Popov
Hello Angus,

Monday, November 28, 2005, 2:05:17 PM, you 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 (by the way, the value
of  this  file  is not mentioned in the documentation anywhere, and it
should, imho :)

> I  suspect  that we're not very clever at changing the string in one
> 8bit encoding to another 8bit encoding.
>> 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?

Still, is it possible that the GTK frontend will be without this flaw?

>> 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.
So it's no problem that all these settings are in my .lyxrc, for both
the frontends. Good.

> 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.
qtconfig, 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.

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??

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.

--
WBR,
Andrei Popov

Using LyX 1.3.6 on Debian GNU/Linux



Re: Re[2]: Label font -- wrong encoding (+ ERT encoding)

2005-11-28 Thread Angus Leeming
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