|
|
|
|
129
|
suffix = u'…'
|
129
|
suffix = u'…'
|
130
|
cooked = raw.decode("utf-8")
|
130
|
cooked = raw.decode("utf-8")
|
131
|
if self.plugindata.fmt == "plain":
|
131
|
if self.plugindata.fmt == "plain":
|
132
|
- if self.plugindata.maxlen and len(raw) > self.plugindata.maxlen:
|
|
|
|
|
132
|
+ if self.plugindata.maxlen and len(cooked) > self.plugindata.maxlen:
|
133
|
newlen = self.plugindata.maxlen - len(suffix)
|
133
|
newlen = self.plugindata.maxlen - len(suffix)
|
134
|
cooked = cooked[:newlen] + suffix
|
134
|
cooked = cooked[:newlen] + suffix
|
135
|
return cooked.encode("utf-8")
|
135
|
return cooked.encode("utf-8")
|