bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: wrong codepage used by gettext


From: Bruno Haible
Subject: Re: wrong codepage used by gettext
Date: Wed, 28 Apr 2004 12:30:41 +0200
User-agent: KMail/1.5

vassily ragosin wrote:
> Gettext version: all gettext releases up to 0.13.1 have this bug.
>
> Concerned platforms: WinNT console, maybe Win95 console as well
>
> Background information: As usual with Microsoft, for "historic reasons",
> different codepages are used by win32 gui and win32 console when working
> with Russian 8-bit text. Console window uses cp866, GUI uses cp1251 as a
> native encoding.
>
> Description: When gettext performs the output to win32 *console* stdout,
> wrong (cp1251) codepage (instead of cp866) is used for Russian locale. As a
> result, localized messages output to win32 console from gettext-enable
> console programs are not usable, because most of the mature
> Russian-speaking population do not have the ability of builtin libiconv in
> their brains to be able to decipher wrong codepage messages on the fly.
>
> Solutions: gettext need to convert text to cp866 when output is on windows
> console stdout or when trying to  set a title of win32 console with a
> localized russian string.
>
> Patches: sorry.

Hi,

Thanks for this precise and comprehensive bug report.

Many Windows programs, even from the Devil Company itself, show the same
bug, and there is no known way to change the behaviour. I.e. they are
themselves too lazy to look if the standard output file handle refers to
a console or not.

For gettext programs there is a simple solution: Set the environment
variable OUTPUT_CHARSET. Example:

In bash:

        export OUTPUT_CHARSET=CP866

In CMD:

        set OUTPUT_CHARSET=CP866

Bruno





reply via email to

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