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 :-)
Comments (3)
James Tauber on April 16, 2006:
I presume LC_CTYPE affects a broader range of commands.
Geof on April 16, 2006:
Add a Comment
Last Modified: April 16, 2006
Author: jtauber
dda on April 16, 2006:
Works fine for me.