Encoding name can contain underscores.

This commit is contained in:
Serhiy Storchaka 2016-03-17 15:47:38 +02:00
parent e8c05569ec
commit 40d4760aea
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ Defining the Encoding
# vim: set fileencoding=<encoding name> :
More precisely, the first or second line must match the regular
expression "^[ \t\v]*#.*?coding[:=][ \t]*([-.a-zA-Z0-9]+)".
expression "^[ \t\v]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)".
The first group of this
expression is then interpreted as encoding name. If the encoding
is unknown to Python, an error is raised during compilation. There