[sane-devel] Encoding of backend translations

mh crapsite@gmx.net
Fri, 1 Mar 2002 17:00:34 +0100


Henning Meier-Geinitz, Freitag, 1. März 2002 15:59:
> Hi,
>
> On Fri, Mar 01, 2002 at 02:12:21PM +0100, mh wrote:
> > I'd just like to ask, whether it would be a problem to use UFT8 encoding
> > for the backend translations?
> > Reason:
> > The KDE i18n framework has been switched to UTF8; .mo files generated
> > from .po files encoded e.g. in iso-8859-1 are not displayed correctly
> > (missing "Umlaute"/vowel mutations).
> > As far as I know, this wouldn't affect xsane (Oliver?), but would make
> > access to the backend translations much easier for KDE applications.
>
> I didn't look into the details here, but the po files include a
> Content-Type header, so it's up to KDE to convert the charset into
> something it likes in my opinion.

Hmm, but at runtime, you normally load the .mo file, .po files are not part 
of the sane installation and probably will not be available if someone 
installed sane rpms, or am I missing something ?
I don't know, why KDE handles it the way it does; but after I asked for help, 
the reply I got was: "encode your .po files in utf8"
Therefore it would be nice, if we could find a solution that works for all 
parties. (if possible at all)

> I'm not sure how easy/complicated it's to convert and edit the
> existing files using UTF8 and if there are any problems with older
> versions of gettext. E.g. does gettext convert the trenslations back
> to iso-8859-1 (or whatever) if used in a (non-gtk) program?

I think it's fairly easy with "recode"; with a correctly set up KBabel it's 
just a load and save operation.

> Is this supported by the (X)Emacs po mode/mule? I could convert the
> files using iconv but can't check the result for correctness.

From the KDE website:
Status: O

"Normal Emacs can't use UTF8 but there are additional packages to add that 
support. One can be found from http://www.cs.ust.hk/~otfried/Mule/"

Michael