summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-09-29 09:24:00 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-09-29 09:24:00 +0200
commitba9d273aa7526b179dc4f5cb6b65ceedc5b41210 (patch)
treec4395ec07ded09eecfbd09686ed55323f090a48d
parent8d4d4839a62e6aa76c9cce0970a9db4b7a0ad41f (diff)
downloadcython-ba9d273aa7526b179dc4f5cb6b65ceedc5b41210.tar.gz
Fix 'coding' cookie detection in the second source line.
Closes #2632.
-rw-r--r--Cython/Utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utils.py b/Cython/Utils.py
index 0e04c7a61..6caf41046 100644
--- a/Cython/Utils.py
+++ b/Cython/Utils.py
@@ -259,7 +259,7 @@ def detect_opened_file_encoding(f):
elif len(lines) > 1:
m = _match_file_encoding(lines[1])
if m:
- return m.group(1).decode('iso8859-1')
+ return m.group(2).decode('iso8859-1')
return "UTF-8"