mutt, vim, and a problem with deadkey accents

Hello,

I ssh into a email account and use mutt with a vim editor. I’ve had a lingering problem I would like to fix with the way accents appear as I type them (the messages I receive are all properly formatted),

If I type 'a to make á, for instance, I will see this represented as "á " in the vim editor – that is, with a space after the accented character. If I just ignore this space, it is properly formatted for those who receive the messages. If I delete the space it is sometimes ok and sometimes reformated as �.

If I type capital letters with accents it is worse yet. Typing “CÁPÌTÁLS” appears as

C�[3P�[3T�[3LS~A

, though it is properly formatted in the message I send.

in .bashrc for the account where I call mutt, I have

export LC_CTYPE=en_US.iso88591

and I put just these character mappings from here (Deadkeys / Accented Characters and Mutt integration - Vim Tips Wiki - a Wikia wiki) in .vimrc

I tried to decipher this page (Vim documentation: digraph), but I didn’t see anything that I should clearly be doing from this.

This looked promising:

…Then displaying received messages containing umlauts or other special characters is most likely no problem at all. But writing messages results in a total mess. For instance sending a string containing “öäüß@€” results in “öÀÌÃ\237@â\202¬”. You can fix this by setting up your own ~/.vimrc holding the following:

set encoding& " terminal charset: follows current locale
set termencoding=
set fileencodings= " charset auto-sensing: disabled
set fileencoding& " auto-sensed charset of current buffer

from (MuttWiki: MuttFaq/Charset), but I still have that problem after including this in .vimrc.

Has anyone beat this? Or have I done something glaringly incorrect?

Thanks in advance for your suggestions.
Whoops, meant to put this in applications, sorry multimedia. It looks like I can’t delete or move it myself though…

I didn’t have LC_ALL set, and the problems seem to have been resolved when I set this.

In the terminal I entered:

perl -e ""

to check if my locale settings were in order or not. It sent me errors for those that were faulty.