in reply to Re^7: encoding problem om Ubuntu Linux
in thread encoding problem om Ubuntu Linux

root@slarti:/media/usbdisk/music_org/scripts/test# localev LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


:set encoding
encoding=utf-8

:set fileencoding
fileencoding=latin1

Replies are listed 'Best First'.
Re^9: encoding problem om Ubuntu Linux
by moritz (Cardinal) on Jun 20, 2008 at 12:48 UTC
    Well, if vim says the file is encoded in latin1, I believe that. Try to use Encode to or open my $handle, '<:encoding(ISO-8859-1)', $file to decode it, and then re-encode it as utf-8. It also explains why cat'ting the file doesn't display the file names correctly.

    See my reply on your original question for more details on de- and encoding.