+/* This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+
+ (C) 2001 by The Genes Development Team
+ Original author: Peter Verthez (Peter.Verthez@advalvas.be)
+*/
+
+/* $Id$ */
+/* $Name$ */
+
#include <string.h>
#include <iconv.h>
#include <search.h>
ENCODING_CONF_FILE);
return;
}
- else if (buffer[0] != '#') {
+ else if ((buffer[0] != '#') && (strcmp(buffer, "\n") != 0)) {
if (sscanf(buffer, "%s %s %s", gedcom_n, charwidth, iconv_n) == 3) {
add_encoding(gedcom_n, charwidth, iconv_n);
}
memset(conv_buf, 0, sizeof(conv_buf));
conv_buf_size = 0;
cd_to_internal = iconv_open(INTERNAL_ENCODING, encoding);
+ if (cd_to_internal == (iconv_t) -1) {
+ gedcom_error("Error opening conversion context for encoding %s: %s",
+ encoding, strerror(errno));
+ }
}
return (cd_to_internal != (iconv_t) -1);
}