buffer_length = content_length + line_length + 2;
msg = realloc(msg, buffer_length);
if (msg == NULL) {
- wprintf("<B>realloc() error! "
- "couldn't get %d bytes: %s</B><br /><br />\n",
+ wprintf("<B>");
+ wprintf(_("realloc() error! couldn't get %d bytes: %s"),
buffer_length + 1,
strerror(errno));
+ wprintf("</B><br /><br />\n");
return;
}
strcpy(&msg[content_length], buf);
#ifdef HAVE_ICONV
if ( (strcasecmp(charset, "us-ascii"))
- && (strcasecmp(charset, "UTF-8")) ) {
+ && (strcasecmp(charset, "UTF-8"))
+ && (strcasecmp(charset, ""))
+ ) {
ic = iconv_open("UTF-8", charset);
if (ic == (iconv_t)(-1) ) {
- lprintf(5, "iconv_open() failed: %s\n", strerror(errno));
+ lprintf(5, "%s:%d iconv_open() failed: %s\n",
+ __FILE__, __LINE__, strerror(errno));
}
}
if (ic != (iconv_t)(-1) ) {