String must be unicode for truncation to work for non ascii characters.

svn: r13172
This commit is contained in:
Peter Landgren 2009-09-08 08:42:44 +00:00
parent c3b8ec4fd8
commit 44f3fcde19

View File

@ -134,6 +134,8 @@ class ShowResults(ManagedWindow.ManagedWindow):
elif self.namespace == 'Note': elif self.namespace == 'Note':
note = self.db.get_note_from_handle(handle) note = self.db.get_note_from_handle(handle)
name = note.get().replace('\n', ' ') name = note.get().replace('\n', ' ')
#String must be unicode for truncation to work for non ascii characters
name = unicode(name)
if len(name) > 80: if len(name) > 80:
name = name[:80]+"..." name = name[:80]+"..."
gid = note.get_gramps_id() gid = note.get_gramps_id()