[Eric] Eric 4 encoding

John Smith john_5029 at hotmail.co.uk
Thu May 14 16:10:07 BST 2009


Hi all - I am running Eric 4.3.3 (r3080) and have found a problem with encoding. When I try the following example (to print a British pound sign) I get the following error dialog:
        
                     The file /home/ed/source/erictest/tcode.py contains the syntax error 
                     Non-Ascii character '\xc2' in file /home/ed/source/erictest/tcode.py
                     on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html
                     for details at line 1, character 0.

Here is the offending code:

        a="£"
        print a

I find that inserting a "#coding: utf-8" at the top fixes this. I have looked at eric4.py and it seems to set the string encoding to utf-8 in it's setup but maybe looses this setting somewhere ?
I quite often have pound signs in my code and are constantly forgetting to set the coding setting. Is there a setting somewhere to fix this ? Forgive me if this is something obvious !

Kind Regards,
BgEddy
    

    


_________________________________________________________________
Beyond Hotmail — see what else you can do with Windows Live.
http://clk.atdmt.com/UKM/go/134665375/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/eric/attachments/20090514/7aab81f9/attachment.html


More information about the Eric mailing list