tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unicode text, UTF-16, little-endian with less(1)

On Mon, 17 Mar 2008 09:56:29 -0500 (CDT)
"Jeremy C. Reed" <> wrote:

> So I have a file from some Windows system of file type:
>  Unicode text, UTF-16, little-endian
> cat(1) displays it fine to my xterm, but way to long for me to scroll 
> back. And I don't want to manually chop up with head and tail to read :)

> Any examples of getting less to view this?

Something like this should work:

$ iconv -f utf-16 -t utf-8 < file.txt | LESSCHARSET=utf-8 less
$ iconv -f utf-16 -t iso8859-1 < file.txt | less

Home | Main Index | Thread Index | Old Index