Getting less to work with UTF-8


I've been working with UTF-8 files on the 'nix command-line for years, most recently on OS X.

I've been frustrated that things like cat and head work fine once Terminal is set to display UTF-8 but less doesn't seem to recognize UTF-8 even in that case.

I finally got around asking Google for a solution.

20 seconds later, I found it:

export LC_CTYPE="en_US.UTF-8"

via Notes on UTF-8 and locales

Boy do I feel stupid for not just looking it up earlier!

Anyway, maybe someone else will find that useful to know :-)

The original post had 3 comments I'm in the process of migrating over.