summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-23 20:16:54 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-23 20:17:24 +0100
commita6366f5dae0e8332cfdad0894aa6e5c7fc3faa2c (patch)
treef93c4fed42a19d81b661e887c284f6a6802ad1f9
parentbc917a0efc03b8c28966c9ab474f525752ebe440 (diff)
downloadlibguestfs-a6366f5dae0e8332cfdad0894aa6e5c7fc3faa2c.tar.gz
libguestfs-a6366f5dae0e8332cfdad0894aa6e5c7fc3faa2c.tar.xz
libguestfs-a6366f5dae0e8332cfdad0894aa6e5c7fc3faa2c.zip
python: Set file encoding to utf-8.
-rw-r--r--generator/generator_python.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/generator/generator_python.ml b/generator/generator_python.ml
index dda04146..dc2cd288 100644
--- a/generator/generator_python.ml
+++ b/generator/generator_python.ml
@@ -567,6 +567,11 @@ initlibguestfsmod (void)
(* Generate Python module. *)
and generate_python_py () =
+ (* This has to appear very near the top of the file, before the large
+ * header.
+ *)
+ pr "# coding: utf-8\n";
+
generate_header HashStyle LGPLv2plus;
pr "\