On Fri, Aug 25, 2006 at 08:28:46PM -0400, Kyle Wheeler wrote: > On Friday, August 25 at 07:09 PM, quoth Kurt Roeckx: > >So, I was reading the documentation, and it seems that the only > >thing that I should consider changing seems to be file_charset. > >I've tried setting that to various things like just "utf-8", or > >"utf-8:iso-8859-1", but it doesn't seem to be changing anything. > > Mutt degrades the charset to the weakest one necessary. In other > words, if the characters that you use in your file are all valid > iso-8859-1 characters, then mutt will treat the file as iso-8859-1.
vim is set up to try utf-8 first, and if it fails fall back to iso-8859-1. If I'm replying to a mail, and mutt stores the text in iso-8859-1, vim will detect that proplery, and things work. If I start to write a mail myself, it doesn't contain any non-ascii characters, so vim has no reason to fallback to latin1, and treats the file contents as utf-8. > This is generally considered a good thing because more people can read > iso-8859-1 files than can read utf-8 files, and there???s no reason to > call it utf-8 if there???s a more common charset that correctly > describes the file???s contents. It might be a good thing, but it's not really what I want, and it's not really working either. vim seems to be figuring out what charset mutt used to save the file if it's non-ascii, but mutt then can't figure out what charset vim used if it's non-ascii. > >It seems that mutt always considers the encoding of the filename to > >be the same as for the terminal, and that's not really what I want. > > Wait, you???re trying to make the *filename* be encoded in utf-8? Sorry, that was a typo, it should just have said file. I'm always talking about the contents, the name of the file doesn't matter, and is ascii anyway. > >Forcing the charset to utf-8 to seems to be working, but then I > >can't properly read mails in mutt. > > Why can???t you properly read mails in mutt? What I mean with forcing it to utf-8, is doing set charset=utf-8, but keeping a latin1 terminal. Of course this is causing various problems with displaying anything non-ascii. In that case, vim properly generates a utf-8 file and mutt reads it properly as an utf-8 file, and when I send it, it sends it as iso-8859-1, and does set charset to iso-8859-1. So then everything works as it should. The way it is now, it sends things as vim saves the file as utf-8, and mutt sends the contents of the file as vim generated it, so with utf-8 characters in it, and sets charset in the header to either "iso-8859-1" or "unknown-8bit", instead of utf-8 or changing it to iso-8859-1 as it does when the charset in mutt is set to utf-8. (I can't reproduce the unknown-8bit though.) If mutt would either auto detect that the file is in utf-8, or there was an option I could use to tell it to try that, things should work as I want them. Setting my terminal really in utf-8 mode would solve all my problems, the problem is that all the software I use currently does not support that, so I keep my terminal in latin1 mode. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

