Another å, ä, ö question

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Sep 20 03:16:45 EDT 2016


On Tuesday 20 September 2016 06:21, Martin Schöön wrote:

> I am puzzled: With Geany there is no problem but outside Geany
> I am punished by Python for using Swedish.
> 
> Any ideas?

Yes, you are being punished for what Sweden did to Julian Assange.

No, only kidding.

We can't really help you if you don't tell us exactly what error you get. Is 
this an error in emacs? A Python error? What exception do you get?

But if I were to take a guess, I think you should put an encoding cookie in the 
first or second line of your text file. Make sure your editor is configured to 
use UTF-8 as the encoding, and put this in line 1 or line 2 of the file:


# -*- coding: utf-8 -*-


That will tell Python to read your file as UTF-8 instead of ASCII.



-- 
Steven
git gets easier once you get the basic idea that branches are homeomorphic 
endofunctors mapping submanifolds of a Hilbert space.




More information about the Python-list mailing list