Search notes:

PEP 263 - Defining Python Source Code Encodings

PEP 263 specifies that a magic comment can be placed in the first or second line of a Python source file to specify the encoding of the file.
In order for a line to be recognized as such a magic comment, it must match the regular expression ^[ \t\f]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+), for example
# coding=latin-1
or
# -*- coding: utf-8 -*-
or the following line (which simultaneously sets a vim option):
# vim: fileencoding=iso-8859-15

See also

Experiments with source file encoding in Python.
PEPs 686 and 3120
A small list of other interesting PEPs

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758199274, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/PEP/0263(54): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78