That's Python issue, not Eric's one. Try running your test script from shell, you'll see the same error. I don't think there's any way of "fixing" this. I use Eric template for # -*- encoding

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/


_______________________________________________
Eric mailing list
Eric@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Reply via email to