head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.54 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.52 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.50 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.48 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.46 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.44 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.42 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.40 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.38 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.36 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.34 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.32 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.30 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.28 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.26 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.24 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.22 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.20 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.18 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 netbsd-1-6-1:1.3.0.2 netbsd-1-6-1-base:1.3; locks; strict; comment @# @; 1.4 date 2003.05.09.15.21.32; author drochner; state dead; branches; next 1.3; 1.3 date 2002.12.30.20.26.08; author jmcneill; state Exp; branches; next 1.2; 1.2 date 2002.12.30.19.19.18; author jmcneill; state Exp; branches; next 1.1; 1.1 date 2002.09.07.17.40.51; author mjl; state Exp; branches; next ; desc @@ 1.4 log @update to 0.91, provided by Marc Recht per PR pkg/20750 Most notable changes: -uses gtk2 now -Python support -cleanups, UI improvements, fixes... @ text @$NetBSD: patch-ba,v 1.3 2002/12/30 20:26:08 jmcneill Exp $ --- lib/charconv.c.orig Thu May 16 20:06:50 2002 +++ lib/charconv.c Mon Dec 30 15:46:33 2002 @@@@ -69,6 +69,8 @@@@ { static char *this_charset = NULL; static int local_is_utf8 = 0; + unicode_iconv_t t1 = (unicode_iconv_t)(-1); + unicode_iconv_t t2 = (unicode_iconv_t)(-1); if (this_charset) { *charset = this_charset; @@@@ -98,7 +100,8 @@@@ if ((*charset == NULL) || (0==strcmp(*charset,"US-ASCII")) || - (0==strcmp(*charset,"ANSI_X3.4-1968"))) { + (0==strcmp(*charset,"ANSI_X3.4-1968")) || + (**charset == '\0')) { /* we got basic stupid ASCII here. We use its sane superset instead. Especially since libxml2 doesn't like the pedantic name of ASCII. */ @@@@ -108,8 +111,25 @@@@ } this_charset = *charset; - local_is_utf8 = (*charset) && (0==strcmp(*charset,"UTF-8")); - + if (*charset) { + if (strcmp(*charset, "UTF-8") != 0) { + if ((t1 = unicode_iconv_open(*charset, "UTF-8")) == (unicode_iconv_t)(-1) + || (t2 = unicode_iconv_open("UTF-8", *charset)) == + (unicode_iconv_t)(-1)) { + g_warning("unicode_iconv_open does not understand your charset %s\n%s", + *charset, + "Using UTF-8 as local. Set LC_CTYPE or CHARSET."); + local_is_utf8 = 1; + *charset = "UTF-8"; + } + } else + local_is_utf8 = 1; + } + if (t1 != (unicode_iconv_t)(-1)) + unicode_iconv_close(t1); + if (t2 != (unicode_iconv_t)(-1)) + unicode_iconv_close(t2); + return local_is_utf8; } @ 1.3 log @Fix warning message so we display the current charset properly. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Make dia fallback to UTF-8 if it doesn't understand our charset instead of segfaulting -- from Jarkko Torppa. Closes pkg/19008. Now that dia works again, remove the BROKEN tag from the Makefile. @ text @d3 2 a4 2 --- charconv.c.orig Thu May 16 20:06:50 2002 +++ charconv.c Mon Dec 30 15:13:23 2002 d35 3 a37 3 + g_warning("unicode_iconv_open() does not understand your charset %s\n", + "Using UTF-8 as local. Set LC_CTYPE or CHARSET.", + *charset); @ 1.1 log @Add patches from freebsd I forgot last time around @ text @d3 12 a14 3 --- lib/charconv.c.orig Fri May 17 01:06:50 2002 +++ lib/charconv.c Sun Sep 1 02:54:46 2002 @@@@ -98,7 +98,8 @@@@ d24 28 @