git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] Explicitly specify utf-8 coding in file

From
Karl Hasselström <kha@treskal.com>
Date
May 24, 2006, 06:07 UTC
Message-ID
<20060524060721.GC1490@diana.vm.bytemark.co.uk>
In-Reply-To
<20060524060537.GA1173@diana.vm.bytemark.co.uk>

uncommit.py has a non-ascii character in it (in my name in the copyright line). Without this coding: comment, I get an error like the following when I run stgit:

  /home/kha/git/stgit/stgit/main.py:61: DeprecationWarning: Non-ASCII
  character '\xc3' in file
  /home/kha/git/stgit/stgit/commands/uncommit.py on line 3, but no
  encoding declared; see http://www.python.org/peps/pep-0263.html for
  details
---
 stgit/commands/uncommit.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/uncommit.py b/stgit/commands/uncommit.py
index e03d207..52ce5a8 100644
--- a/stgit/commands/uncommit.py
+++ b/stgit/commands/uncommit.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 __copyright__ = """
 Copyright (C) 2006, Karl Hasselström <kha@treskal.com>
 
Previous: Karl HasselströmNext: Catalin Marinas
Message 4 of 5 in “A few stgit bugfixes”
  1. Karl HasselströmMay 24, 2006
  2. 1/3 Fix infinite recursion on absolute pathsKarl Hasselström, May 24, 2006
  3. 2/3 Fix indexing error during "diff -r/"Karl Hasselström, May 24, 2006
  4. 3/3 Explicitly specify utf-8 coding in fileKarl Hasselström, May 24, 2006
  5. Catalin MarinasMay 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.