Blame SOURCES/cobbler-unicode-scripts.patch

1330ca
diff -rupN cobbler-2.0.7.old/cobbler/templar.py cobbler-2.0.7/cobbler/templar.py
1330ca
--- cobbler-2.0.7.old/cobbler/templar.py	2015-05-06 14:47:57.858206601 -0400
1330ca
+++ cobbler-2.0.7/cobbler/templar.py	2015-05-06 14:54:56.002214099 -0400
1330ca
@@ -108,6 +108,9 @@ class Templar:
1330ca
         # tell Cheetah not to blow up if it can't find a symbol for something
1330ca
         raw_data = "#errorCatcher ListErrors\n" + raw_data
1330ca
1330ca
+        # specify unicode encoding for Cheetah Compiler
1330ca
+        raw_data = "#unicode UTF-8\n" + raw_data
1330ca
+
1330ca
         table_copy = search_table.copy()
1330ca
1330ca
         # for various reasons we may want to call a module inside a template and pass
1330ca
 
1330ca
diff -rupN cobbler-2.0.7.old/cobbler/template_api.py cobbler-2.0.7/cobbler/template_api.py
1330ca
--- cobbler-2.0.7.old/cobbler/template_api.py	2015-05-06 14:47:57.860206615 -0400
1330ca
+++ cobbler-2.0.7/cobbler/template_api.py	2015-05-06 14:59:50.250384146 -0400
1330ca
@@ -311,8 +311,9 @@ class Template(BuiltinTemplate, MacrosTe
1330ca
                     pass
1330ca
 
1330ca
         try:
1330ca
-            return utils.read_file_contents('%s/%s' % (self.getVar('snippetsdir'),
1330ca
-                file), fetch_if_remote=True)
1330ca
+            return "#unicode UTF-8\n" + utils.read_file_contents(
1330ca
+                    '%s/%s' % (self.getVar('snippetsdir'), file),
1330ca
+                    fetch_if_remote=True)
1330ca
         except FileNotFoundException:
1330ca
             return None
1330ca