On Sat, Feb 28, 2009 at 01:46:22PM +0100, Kurt Roeckx wrote: > Because of #379107 I have this in my vimrc file: > :let &termencoding = &encoding > set encoding=utf-8 > au FileType mail setlocal fenc=latin1 > > However that doesn't seem to work anymore, and the fileencoding is now > set to utf-8 instead of latin1.
From a quick test, using an autocmd to set 'fenc' to latin1 works for me. Could you try ":verbose set fenc?" from the mail file? > I also wanted to set other options for mail now, but it doesn't seem to > have any effect. So my guess was that detections of the filetype was > broken. I use mutt so my files look like > /tmp/mutt-intrepid-1000-28242-16. Testing in my Lenny chroot, that file pattern does get recognized as 'mail' filetype. ":verbose set filetype?" will show what filetype it is set to and which script set it. > But I also just tried "set fenc=latin1" in my vimrc file, but that > doesn't seem to have any effect when editing non-empty files either, it > only seems to have an effect on empty files. If the file already has > ascii text in it, it will always set fenc to utf-8 it seems. From :help 'fenc When reading a file 'fileencoding' will be set from 'fileencodings'. To read a file in a certain encoding it won't work by setting 'fileencoding', use the |++enc| argument. One exception: when 'fileencodings' is empty the value of 'fileencoding' is used. For a new file the global value of 'fileencoding' is used. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
signature.asc
Description: Digital signature

