summarylogtreecommitdiffstats
path: root/unicode.patch
blob: 2fe860f38649f4bcebeb1fcac66b6a0a1ba33e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index b07690c..72ba22d 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -260,6 +260,7 @@ class MenuEditor(object):
         out_path = os.path.join(util.getUserItemPath(), file_id)
 
         contents, length = keyfile.to_data()
+        contents = unicode(contents, 'utf8')
 
         with open(out_path, 'w') as f:
             f.write(contents)
@@ -400,6 +401,7 @@ class MenuEditor(object):
             file_id = util.getUniqueFileId(keyfile.get_string(GLib.KEY_FILE_DESKTOP_GROUP, 'Name'), '.desktop')
 
         contents, length = keyfile.to_data()
+        contents = unicode(contents, 'utf8')
 
         path = os.path.join(util.getUserItemPath(), file_id)
         with open(path, 'w') as f:
@@ -422,6 +424,7 @@ class MenuEditor(object):
         util.fillKeyFile(keyfile, kwargs)
 
         contents, length = keyfile.to_data()
+        contents = unicode(contents, 'utf8')
 
         path = os.path.join(util.getUserDirectoryPath(), file_id)
         with open(path, 'w') as f: