sh weirdness with $PAGER

Hi!

I was wondering can anyone enlighten me why this:

happens.

Screenshot on left is with $ playd cat | $PAGER
Screenshot on right is with $ playd list

Relavent code:
playd cat: http://hg.bsdroot.lv/aldis/playd.sh/file/465f97f543bf/bin/playd.sh#l432
playd list: http://hg.bsdroot.lv/aldis/playd.sh/file/465f97f543bf/bin/playd.sh#l437 (same as playd cat, except that output is piped to $PAGER)

So pretty much playd list should be equivalent to playd cat | $PAGER, but it (playd list) doesn't show unicode characters.

For the sake of experiment I replaced /bin/sh with /usr/local/bin/mksh and I got same output.

I really want to fix this.
 
No. script falls back to more, if env $PAGER is not set.

even playd cat | more works fine, while playd list doesn't even when (PAGER is not set)
 
I found out what was causing all this weirdo...

I forgot that playd can source config file from $PLAYD_HOME/playd.conf if such file exits.
In this file I had
Code:
PAGER=more
export LC_ALL=lv_LV.UFT-8

The second line was causing problems that you can see in screenshot, because my current locale is set to en_GB.UTF-8
 
Back
Top