------- Vidaresänt brev ------- Från: "John Smith" <[email protected]> Till: [email protected] Kopia: Ärende: RE: [Eric] Eric 4 encoding Datum: Fri, 15 May 2009 15:56:05 +0400 My script works fine from python shell(the interpreter), idle shell, Ipython etc. In fact it works from Eric's shell. It fails when the code saved in a module. The template's a good idea - will put that in place. Still I'd like to find out exactly what's going on with the shells working OK. Thanks, BgEddy
Date: Fri, 15 May 2009 14:18:12 +0400 To: [email protected] Subject: Re: [Eric] Eric 4 encoding From: [email protected] 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 [email protected] http://www.riverbankcomputing.com/mailman/listinfo/eric
_________________________________________________________________ Share your photos with Windows Live Photos – Free. http://clk.atdmt.com/UKM/go/134665338/direct/01/ _______________________________________________ Eric mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/eric
