From 2554a1decddbd090bd86c345ecb46eafc8f345ec Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Tue, 8 Sep 2009 06:35:01 +0000 Subject: [PATCH] Strings must be unicode for truncation to work for non ascii characters. svn: r13167 --- src/plugins/tool/RemoveUnused.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/tool/RemoveUnused.py b/src/plugins/tool/RemoveUnused.py index 31d06cb16..55d9ae48b 100644 --- a/src/plugins/tool/RemoveUnused.py +++ b/src/plugins/tool/RemoveUnused.py @@ -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] + "..."