Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Using cygwin I've a problem in less: I can't see colors (for example using grep --color) and I can't set the locale I'm using (LC_ALL=C).

I type this command:

echo òùàòùàòà | grep --color àò | sort | less -R

and the result is:

<C3><B2><C3><B9><C3><A0><C3><B2><C3><B9><C3><A0><C3><B2><C3><A0>

EDIT: This work:

ls --color=yes | less -R

less --version -> 444

EDIT2: solved the problem of colors using the option --color=always, but not solved the problem of locale. Less with colors but strange output

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I can't test this on Cygwin at the moment, but both of these solutions worked for me on Fedora.

echo òùàòùàòà | grep --color=always àò | sort | LC_ALL=en_US.UTF-8 less -R

echo òùàòùàòà | grep --color=always àò | sort | LESSCHARSET=utf-8 less -R

UPDATE:

Just verified that the above work using Cygwin 1.7.9 on Windows XP SP3.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.