Re: Patch: Abiword Bugs 1090 & 1166


Subject: Re: Patch: Abiword Bugs 1090 & 1166
From: Vlad Harchev (hvv@hippo.ru)
Date: Mon Jun 25 2001 - 03:09:21 CDT


On Mon, 25 Jun 2001, Andrew Dunbar wrote:

> Vlad Harchev wrote:
> >
> > On Mon, 25 Jun 2001, Andrew Dunbar wrote:
> >
> > Hi Andrew!
>
> Hi Vlad. I'm breaking my prime directive of never replying at the

 Congratulations! :)

> top of a page (: I looked further into these problems and it turns
> out that the .strings files work 100% fine but the .strings file
> does not contain the menu strings! They are hard-coded in the
> source without declaring their encodings. They are assumed to be
> in the correct encoding to match the locale at runtime. This
> breaks.

 Yes, menu strings are compiled in executable.
 No, charset of the menu text is supplied, e.g see ap_Menu_LabelSet_ru-RU.h:

BeginSetEnc(ru,RU,true,"cp1251")

 So, encoding is specified ("BeginSetEnc" macro is for this, plain "BeginSet"
assumes that all characters in menu translations are available in any
charset).

 Otherwise it would be impossible to see menu in the proper encoding under
unix when the locale's encoding is different from the encoding of menu
localizations.
 But AFAIR only Unix version does actual recoding of menu translations. AFAIK
other platforms' code take the menu translation as is without recoding, so
they should be in proper charset used by "other platforms".

 FYI *menu entries* are OK in AW 0.7.14 under russian locale - I've checked
this personally.
  
> So is there a good reason we separate localized menus from the rest
> of the localized strings?

 Dunno - probably there was one. Now it's decided that supplying menu
translations in .strings file is a Good Thing (tm), but nobody volunteered
to implement this (it's hard due to portability of AW).

> Andrew.
>
> > > 1166 on Windows says Russian strings are in KOI8-R but need to be
> > > in CP1251.
> > > The ru-RU.strings file declares KOI8-R and really is in KOI8-R.
> > > This one should be working.
> >
> > This shouldn't matter - since I remember adding the code that converts text
> > from charset specified in .strings file to the one returned by
> > EncodingManager.
> > If the bug 1166 is opened for 0.7.14 (latest release) and not for current
> > CVS, then everything was possible on Windows since EncodingManager always
> > returned "ISO8859-1" as a system's encoding (in fact, this made all russian
> > strings in dialogs invisible (!) since no russian characters are in
> > iso-8859-1, at least on win95). Thanks to your work, EncodingManager now
> > correctly returns system's charset and everything should work fine under
> > windows without recoding data in .strings file
> >
> > It would be nice to check the correctness, could you please send screenshot
> > of any (perferably small - such as "find") dialog with any russian string
> > visible to the person who opened #1166 or me and ask whether russian is in
> > proper encoding on the screenshot. Or another option (if you don't have the
> > russian locale for windows installed) is to place for downloading zipped
> > abiword.exe (I hope that person who opened #1166 will check it - I can't
> > afford downloading such quantities of data).
> >
> > > My understanding of Abi is that the .strings files can be in any
> > > (currently 8 bit) encoding. Abi reads them in at startup and
> > > converts them to Unicode. At display time Abi converts them from
> > > Unicode to the system's encoding. So the source encoding should
> > > be irrelevant.
> >
> > Exactly. But AFAIR they were being converted to locale's charset, not
> > unicode.
> >
> > > I don't speak Russian or Czech but I'm 99% confident they
> > > both render 100% correctly in Windows with the appropriate locale.
> > > Please check whether these bugs are fixed under both OSes.
> > > If not, please post an example in *Unicode* showing the correct
> > > string and the string as you see it so that I can be sure what
> > > I'm looking for (:
> >
> > Hmm, I checked recoding of .strings many times on unix - it works perfectly.
> > Only windows is affected and needs to be checked.
> >
> > Thanks!
> >
> > Best regards,
> > -Vlad
>
> --
> http://linguaphile.sourceforge.net
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Mon Jun 25 2001 - 02:42:24 CDT