From ed4218047cd0fe195142bfef86068fe6aea17b96 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 7 Aug 2012 07:50:46 +0200 Subject: [PATCH] text: force shorten to return unicode string --- kivy/core/text/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kivy/core/text/__init__.py b/kivy/core/text/__init__.py index e45493f04..fc3155c67 100644 --- a/kivy/core/text/__init__.py +++ b/kivy/core/text/__init__.py @@ -208,11 +208,11 @@ class LabelBase(object): if segment - margin > 5: segment -= margin - return '{0}...{1}'.format(text[:segment].strip(), + return u'{0}...{1}'.format(text[:segment].strip(), text[-segment:].strip()) else: segment = max_letters - 3 # length of '...' - return '{0}...'.format(text[:segment].strip()) + return u'{0}...'.format(text[:segment].strip()) def render(self, real=False): '''Return a tuple(width, height) to create the image