openbsd-ports/www/snownews/patches/patch-xmlparse_c
martynas cdcb0ccc3a - fix UIMainInterface for international charsets
- bump package name
tested by kili@ and Simon Kuhnle
ok kili@
2008-06-09 23:03:15 +00:00

24 lines
772 B
Plaintext

$OpenBSD: patch-xmlparse_c,v 1.1 2008/06/09 23:03:15 martynas Exp $
--- xmlparse.c.orig Sun Feb 17 15:43:58 2008
+++ xmlparse.c Tue Mar 18 18:09:33 2008
@@ -316,6 +316,7 @@ int DeXML (struct feed * cur_ptr) {
xmlDocPtr doc;
xmlNodePtr cur;
struct newsitem *cur_item;
+ char *converted;
if (cur_ptr->feed == NULL)
return -1;
@@ -424,6 +425,11 @@ int DeXML (struct feed * cur_ptr) {
/* Set -> title to something if it's a NULL pointer to avoid crash with strdup below. */
if (cur_ptr->title == NULL)
cur_ptr->title = strdup (cur_ptr->feedurl);
+ converted = iconvert (cur_ptr->title);
+ if (converted != NULL) {
+ free (cur_ptr->title);
+ cur_ptr->title = converted;
+ }
cur_ptr->original = strdup (cur_ptr->title);
/* Restore custom title. */