gPodder Bug Tracker – Bug 1277
Episode descriptions are truncated as utf-8 strings, not unicode
Last modified: 2011-04-11 10:27:35 BST
Created attachment 608 [details]
fix episode description truncation
PodcastEpisode.one_line_description() truncates episode descriptions to 120 characters. If the point of truncation happens to be a UTF-8 sequence, the operation results in an invalid string, GTK+ freaks out:
GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 2 char 132: Invalid UTF-8 encoded text in name - not valid 'Гости: Леонид Млечин Ведущие: Татьяна Фельге�...'
This also results in visual defects, like contents of a row in the episode list changes when you move the mouse pointer above it. To deal with this situation the string needs to be decodec from UTF-8 before truncation. There are two places where this can happen, I'm not sure which one is best. I'm attaching a patch which does this in two places.
Work for me
(In reply to comment #1)
> Work for me
This patch, i mean
Queued for merge, thanks a lot :)
*** Bug 1284 has been marked as a duplicate of this bug. ***
Slightly simplified patch merged: http://gpodder.org/commit/472570b3
The fix will be included in the next gPodder release. Thanks for the patch!
*** Bug 1258 has been marked as a duplicate of this bug. ***
*** Bug 1086 has been marked as a duplicate of this bug. ***
> Slightly simplified patch merged: http://gpodder.org/commit/472570b3
> The fix will be included in the next gPodder release. Thanks for the patch
Confirming that this is now fixed in the latest version of gPodder (2.14) from the Launchpad PPA.