From f1b1555f58651fea2a127d28d0c4a2a8678d187a Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 27 May 2014 21:12:03 +0200 Subject: [PATCH] Use Emacs-friendly file variable to set file encoding The file encoding line serves a dual purpose: it informs both Python and Emacs about the file encoding. PEP 263 explains that a file with non-ASCII characters must specify an encoding. Without an encoding line, importing the file will raise a SyntaxError. The problem is now that while Python will accept both of -*- encoding: -*- -*- coding: -*- and Emacs only accepts the latter since it looks for a file variable named "coding", not "encoding". Since the Emacs specific "-*-" syntax is already used, it seems right to use the correct variable for Emacs. Change-Id: If5321ac2fad595c529aa3ec5f2852aa71458834b --- heat/api/middleware/fault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/api/middleware/fault.py b/heat/api/middleware/fault.py index f10b66ce6f..79ceb49f2d 100644 --- a/heat/api/middleware/fault.py +++ b/heat/api/middleware/fault.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- # # Copyright © 2013 Unitedstack Inc. #