[Github-comments] [geany/geany] Execute not working (#1019)

Colomban Wendling notifications at xxxxx
Mon May 2 13:50:38 UTC 2016


that's a Python question now :)
Python needs to know in which encoding the file it runs is, and this defaults to ASCII.  UTF-8 is compatible with ASCII, but only for the characters that are part of ASCII -- obviously.
So, if you use any non-ASCII characters (i.e. accented letters), you'll have to [tell Python your file is encoded in UTF-8](https://docs.python.org/2/howto/unicode.html#unicode-literals-in-python-source-code).  To do that, add

```python
# -*- coding: utf-8 -*-
```
just below your shebang line (`#!/...python`), e.g. 2nd line probably.

Note that Python3's (current version of Python) default is UTF-8, so if you used it instead of Python2 it'd work without out of the box ;)

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1019#issuecomment-216240962
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160502/b790ea30/attachment.html>


More information about the Github-comments mailing list