From f3931f0168b17aa753341a2253aab1bfe9f59478 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Mon, 7 Sep 2009 20:07:05 +0000 Subject: [PATCH] Slicing of strings must be with unicode strings. svn: r13165 --- src/plugins/tool/RemoveUnused.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/tool/RemoveUnused.py b/src/plugins/tool/RemoveUnused.py index 4fd9a8984..181c1a1df 100644 --- a/src/plugins/tool/RemoveUnused.py +++ b/src/plugins/tool/RemoveUnused.py @@ -424,6 +424,8 @@ 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 sliceing might go wrong. + text = unicode(text) if len(text) > 80: text = text[:80] + "..."