<<< Date Index >>>     <<< Thread Index >>>

Re: mail2muttalias.py problem



On Sat, Jan 12, 2008 at 03:05:31AM +0100, Christian Ebert wrote:
> * Michael on Friday, January 11, 2008 at 18:23:35 -0700
> > I am trying to use mail2muttalias.py with mutt, but when I tap the "A"
> > key, I get the following error:
> > 
> > SyntaxError: Non-ASCII character '\xf6' in file
> > /home/mike/.mutt/mail2muttalias.py on line 114, but no encoding
> > declared; see http://www.python.org/peps/pep-0263.html for details
> > Press any key to continue...
> > 
> > Line 114 of mail2muttalias.py is :
> > inp_addresses = listrex (data,
> > '"?[\s\w\ö\ä\ü\-\ß\_.]*"?\s*<?[\w.-]+\@[\w.-]+>?')
> > 
> > Is there anybody on this list that knows the answer to this? 
> > I'm not a programmer in any sense of the word...I quit back in the days
> > of Commodore basic for the 64 ;) 
> > 
> > I search google, yahoo, comp.mail.mutt, and the mutt-users archives and
> > no answer.
> 
> Why didn't you just follow the link given in the error message?

I did :)
> 
> Find out the encoding of the mail2muttalias.py file, and then
> insert something like:
> 
> # -*- coding: utf-8 -*-
> 
> (assuming the file is in utf-8) as the first or second line.
>
Sorry, I'm not as sharp as you in this :) 
I was thinking/assuming it had to be on the same line as the error.
That's why I asked.
 
> c
> -- 
> Python Mutt utilities <http://www.blacktrash.org/hg/muttils/>

-- 
"Estimated amount of glucose used by an adult human brain each day, expressed 
in M&Ms: 250"


  - Harper's Index