[pass] [PATCH] keepassx2pass: Handle unicode in title

Aleksei Fedotov lexa at cfotr.com
Sun Jul 26 15:29:51 CEST 2015


If keepassx2pass given an xml file containing non-ascii characters in
title, filename will look like: \320\277\320\276\321\201

This patch fixes encoding conversion for title.
---
 contrib/importers/keepassx2pass.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/importers/keepassx2pass.py b/contrib/importers/keepassx2pass.py
index 54d9fbc..e499084 100755
--- a/contrib/importers/keepassx2pass.py
+++ b/contrib/importers/keepassx2pass.py
@@ -37,7 +37,7 @@ def path_for(element, path=''):
     title_text = element.find('title').text
     if title_text is None:
         title_text = ''
-    title = cleanTitle(space_to_camelcase(title_text))
+    title = cleanTitle(space_to_camelcase(title_text.encode('utf8')))
     return '/'.join([path, title])
 
 def password_data(element):
-- 
2.4.3



More information about the Password-Store mailing list