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

What are the values you get when typing
:set encoding :set fileencoding
in vim?

What do you get when you simply enter locale on the command line?

Replies are listed 'Best First'.
Re^8: encoding problem om Ubuntu Linux
by j.goor (Acolyte) on Jun 20, 2008 at 12:42 UTC
    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
      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.