summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-04-13 17:37:51 +0100
committerLars Wirzenius <liw@liw.fi>2013-04-13 17:37:51 +0100
commit5c20414682c3ce1738b84d9ce6c936c0f7ed44cd (patch)
tree87865fa6f10169847acf224a02d3c3e88ba9de7c
parent5dd30fa4f90c17187a1141930954ae04b205fef3 (diff)
downloadclab-5c20414682c3ce1738b84d9ce6c936c0f7ed44cd.tar.gz
Output names in utf-8
-rwxr-xr-xclab3
1 files changed, 2 insertions, 1 deletions
diff --git a/clab b/clab
index 8ea1d5d..9b93ab4 100755
--- a/clab
+++ b/clab
@@ -120,7 +120,8 @@ class CommandLineAddressBook(cliapp.Application):
name = entry.get_single('name', '')
emails = entry.get_subdict('email')
for email in emails:
- self.output.write('%s\t%s\n' % (emails[email], name))
+ n = name.encode('utf-8')
+ self.output.write('%s\t%s\n' % (emails[email], n))
CommandLineAddressBook().run()