瀏覽代碼

Update genpy.ml (#5904)

Fixes issue #5903
Franco Ponticelli 8 年之前
父節點
當前提交
d778263fc8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/generators/genpy.ml

+ 2 - 2
src/generators/genpy.ml

@@ -2461,7 +2461,7 @@ module Generator = struct
 	let run com =
 		Transformer.init com;
 		let ctx = mk_context com in
-		Codegen.map_source_header com (fun s -> print ctx "# %s\n" s);
+		Codegen.map_source_header com (fun s -> print ctx "# %s\n# coding: utf-8\n" s);
 		if has_feature ctx "closure_Array" || has_feature ctx "closure_String" then
 			spr ctx "from functools import partial as _hx_partial";
 		gen_imports ctx;
@@ -2478,4 +2478,4 @@ module Generator = struct
 end
 
 let generate com =
-	Generator.run com
+	Generator.run com