Blob Blame Raw
--- snownews-1.5.7/config.h.orig	2005-06-05 05:50:22.000000000 -0400
+++ snownews-1.5.7/config.h	2005-08-01 21:44:51.000000000 -0400
@@ -27,10 +27,9 @@
 #include "version.h"
 #include "netio.h"
 
-/* Set your charset here. ISO-8859-1 is default. */
-#ifndef TARGET_CHARSET
-#define TARGET_CHARSET "ISO-8859-1"
-#endif
+/* Set your charset here. This overrides the CODESET setting
+   as reported by nl_langinfo() */
+/* #define TARGET_CHARSET "UTF-8" */
 
 struct feed {
 	char *feedurl;							/* Non hashified URL */
@@ -126,10 +125,16 @@
 #ifdef LOCALEPATH
 #	include <libintl.h>
 #	include <locale.h>
+#ifndef TARGET_CHARSET
+#       include <langinfo.h>
+#endif
 #endif
 
 #ifdef LOCALEPATH
 #	define _(String) gettext (String)
+#ifndef TARGET_CHARSET
+#      define TARGET_CHARSET nl_langinfo(CODESET)
+#endif
 #else
 #	define _(String) (String)
 # 	define ngettext(Singular, Plural, n) (Plural)
--- snownews-1.5.7/interface.c.orig	2005-06-05 05:50:22.000000000 -0400
+++ snownews-1.5.7/interface.c	2005-08-01 21:46:30.000000000 -0400
@@ -1151,7 +1151,8 @@
 			else
 				columns = COLS-9-strlen(_("new"));
 			
-			mvaddnstr (ypos, 1, cur_ptr->title, columns);
+			localized_msg = iconvert(cur_ptr->title);
+			mvaddnstr (ypos, 1, localized_msg, columns);
 			if (xmlStrlen((xmlChar *)cur_ptr->title) > columns)
 				mvaddstr (ypos, columns+1, "...");
 			
--- snownews-1.5.7/configure.orig	2005-08-29 14:40:50.000000000 -0400
+++ snownews-1.5.7/configure	2005-08-29 14:41:03.000000000 -0400
@@ -6,7 +6,7 @@
 # The defaults. Change here if you need.
 my($prefix) = "/usr/local";
 my($cflags) = '-Wall -Wno-format-y2k -O2 -DLOCALEPATH="\"$(LOCALEPATH)\"" -DOS=\"$(shell uname)\" `xml2-config --cflags` $(EXTRA_CFLAGS) ';
-my($ldflags) = '-lncurses `xml2-config --libs` $(EXTRA_LDFLAGS) ';
+my($ldflags) = '-lncursesw `xml2-config --libs` $(EXTRA_LDFLAGS) ';
 
 parse_cmdl_line();