[Lunar-commits] <moonbase> less: removed LESSCHARSET variable defining LESSCHARSET to latin1 is very bad and makes no sense. Text displayed via less is terribly broken if not using old ISO8859 encoding or US ASCII. Also makes no sense. Here is info why: From the manpage:

Zbigniew Luszpinski zbiggy at lunar-linux.org
Wed Jul 14 00:24:58 CEST 2010


commit a9b90fc776d3c7b4be11e4b455a20dfc86478637
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Wed Jul 14 00:24:58 2010 +0200

    less: removed LESSCHARSET variable
    defining LESSCHARSET to latin1 is very bad and makes no sense.
    Text displayed via less is terribly broken if not using old ISO8859
    encoding or US ASCII. Also makes no sense. Here is info why:
    From the manpage:
    
    If neither LESSCHARSET nor LESSCHARDEF is set, but any of the strings
    "UTF-8", "UTF8", "utf-8" or "utf8" is found in the LC_ALL, LC_TYPE or
    LANG environment variables, then the default character set is utf-8.
    
    If that string is not found, but your system supports the setlocale
    interface, less will use setlocale to determine the character set.
    setlocale is controlled by setting the LANG or LC_CTYPE environment
    variables.
    
    Finally, if the setlocale interface is also not available, the default
    character set is latin1.
    
    So removing LESSCHARSET from profile fixes display on my utf-8 Lunar.
---
 utils/less/profile.d/less.rc |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/utils/less/profile.d/less.rc b/utils/less/profile.d/less.rc
index 8834b47..fc3931f 100644
--- a/utils/less/profile.d/less.rc
+++ b/utils/less/profile.d/less.rc
@@ -1,6 +1,5 @@
 
 # these gadgets make less work nicer:
-export LESSCHARSET=latin1
 export LESS="-M -S -I"
 export LESSOPEN="|lesspipe.sh %s"
 


More information about the Lunar-commits mailing list