[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong codepage used by gettext

From: Bram Moolenaar
Subject: Re: wrong codepage used by gettext
Date: Wed, 28 Apr 2004 18:30:17 +0200

Bruno -

> Bram Moolenaar wrote:
> > The problem is not so much that it can't be solved in some way, but that
> > the default codepage that gettext is using is wrong.
> It is wrong for your case, because vim is outputting the resulting string
> to a console.
> If it were outputting it to an Emacs buffer, or to a file that is then
> opened by the user in a GUI editor, it would be right.
> But gettext cannot guess what an application will do with the strings.
> Therefore there cannot be a default setting that is right in all cases.

The common programmer expects messages to be translated in such a way
that he can do:

        printf(_("This is my message"));

That is obviously the normal way to use gettext.  Of course there are
exceptions, and nobody expects the exceptions to be handled
automatically.  But sending messages to stdout is the normal way.

In my opinion gettext should have a decent default, which is the
encoding used for stdout.

I hope you realize how complicated it is for an average programmer to
get all these details right.  Nobody is able to read all the relevant
documentation, or even know what is relevant.  How does one find out
about GetConsoleOutputCp()?  I didn't know about it until someone
pointed it out.  Would be good if this kind of knowledge would be
incorporated in setting a good default in gettext.

- Bram

hundred-and-one symptoms of being an internet addict:
40. You tell the cab driver you live at
41. You actually try that 123.elm.street address.

 /// Bram Moolenaar -- address@hidden -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///

reply via email to

[Prev in Thread] Current Thread [Next in Thread]