Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] helpfiles: Also accept 'UTF-8' as an encoding name.



On 2013-11-15 at 19:58 +0000, Martin Vaeth wrote:
> Got it!  LESSCHARSET=utf-8 was set here which was the culprit.
> So LANG=C seems to work if all LESS* and LC_* variables
> are reset.

Side-note: this highlights that we're reading the output after it has
passed through whichever pager was invoked by man(1), which indicates
there are still stability issues here, if the pager happens to be
something else, such as lv(1) influenced by $LV and a config variable.

> +foreach (keys %ENV) {
> +	delete($ENV{$_}) if(/^((LC_)|(LESS)|(MAN))/);
> +}

You might consider adding after this:

    $ENV{'PAGER'} = 'cat';

to bypass a class of problems here.  (I don't know of any man command
using $VIEWER instead of $PAGER, but perhaps better safe than sorry and
set that too.)

-Phil



Messages sorted by: Reverse Date, Date, Thread, Author