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

svn: r13167
This commit is contained in:
Peter Landgren 2009-09-08 06:35:01 +00:00
parent cfa140e165
commit 2554a1decd

View File

@ -433,6 +433,9 @@ class RemoveUnused(Tool.Tool,ManagedWindow.ManagedWindow,UpdateCallback):
text = " ".join(text.split())
# if the note is too long, truncate it
# but first set type of text to unicode, otherwise the truncation
# might be wrong for non ascii characters
text = unicode(text)
if len(text) > 80:
text = text[:80] + "..."