Package: postgresql-contrib-8.1 Severity: normal Tags: patch Hello, according to contrib/dbase/Makefile, iconv support for dbf2pg is disabled. If there is no specific reason to do so, it would be really nice to uncomment the PG_CPPFLAGS += -DHAVE_ICONV_H line, so that dbf2pg can convert charsets properly.
Moreover, the user is not informed about lack of iconv support, and that causes a lot of problems trying to understand why there is no charset conversion even passing -F (and -T) to the command line. :) The attached patch prints a warning if there is no iconv support and the user passes the -F option. Thanks! -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.14-1-686 Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) ciao, ema
--- /home/ema/debian/postgresql-8.1-8.1.0/postgresql-8.1.0/contrib/dbase/dbf2pg.c 2005-10-15 04:49:04.000000000 +0200 +++ dbf2pg.c 2005-11-11 19:43:50.000000000 +0100 @@ -618,10 +618,14 @@ case 'U': username = (char *) strdup(optarg); break; -#ifdef HAVE_ICONV_H case 'F': +#ifdef HAVE_ICONV_H charset_from = (char *) strdup(optarg); +#else + printf("WARNING: dbf2pg was compiled without iconv support, ignoring -F option\n"); +#endif break; +#ifdef HAVE_ICONV_H case 'T': charset_to = (char *) strdup(optarg); break;
signature.asc
Description: Digital signature