Fix warning message so we display the current charset properly.

This commit is contained in:
jmcneill 2002-12-30 20:26:08 +00:00
parent c5354775e6
commit 8dfae664e5
2 changed files with 8 additions and 8 deletions

View file

@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.6 2002/12/30 19:20:12 jmcneill Exp $
$NetBSD: distinfo,v 1.7 2002/12/30 20:26:08 jmcneill Exp $
SHA1 (dia-0.90.tar.gz) = 7e9705dbf3f3ce62a58169f531dbc635140a88d8
Size (dia-0.90.tar.gz) = 2888211 bytes
SHA1 (patch-aa) = ed5bb19334fcacc772aa1c504fc3c3e4dab933b4
SHA1 (patch-ab) = 9ec08acce0b9a2fe5f2e6b8b15cf294d961aabe1
SHA1 (patch-ba) = 0f52f095a7707ce8d2006d933acc7f134866b69c
SHA1 (patch-ba) = 1f19128f6819e25011c79ea79fbaa962f7e9a660
SHA1 (patch-bb) = 3838f817e02df719b121029e151d84cb307c7fd5

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ba,v 1.2 2002/12/30 19:19:18 jmcneill Exp $
$NetBSD: patch-ba,v 1.3 2002/12/30 20:26:08 jmcneill Exp $
--- charconv.c.orig Thu May 16 20:06:50 2002
+++ charconv.c Mon Dec 30 15:13:23 2002
--- 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;
@ -32,9 +32,9 @@ $NetBSD: patch-ba,v 1.2 2002/12/30 19:19:18 jmcneill Exp $
+ 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",
+ "Using UTF-8 as local. Set LC_CTYPE or CHARSET.",
+ *charset);
+ 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";
+ }