[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] Add support for GETTEXTIOENCODING environment variable
Re: [bug-gettext] Add support for GETTEXTIOENCODING environment variable?
Fri, 26 Apr 2019 01:04:07 +0200
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )
Michele Locati wrote:
> The author of POEdit (Václav Slavík - https://github.com/vslavik )
> wrote a really helpful patch that can be used to control the I/O
> charset encoding with an environment variable (GETTEXTIOENCODING).
> This is very handy (in particular under Windows) to easily control the
Such a feature already exists in libintl; it's the environment variable
OUTPUT_CHARSET. I've now documented this variable through
> What about merging it directly in gettext?
While changing the locale_charset() function, like you did, may be the more
correct approach - whereas OUTPUT_CHARSET currently is only considered by
the libintl functions -, I hesitate to do it like this because some outputs
are meant to go into files, and ultimately it's the programmer which should
decide which things should come out in the ANSI code page and which should come
out in the OEM code page. So, we would need to replace locale_charset with
(similarly to what is done in Python, GNU clisp, etc.) I'm not sure this added
complexity is worth the trouble.