]> code.citadel.org Git - citadel.git/blobdiff - webcit/html2html.c
* Bumped internal version number to 6.31. Minimum Citadel server required
[citadel.git] / webcit / html2html.c
index 8a2b5c9bd6db1623e2c57f4f7d5ba5c1761d6329..f41ac542a69977a5b479c5bb3f73902998c44171 100644 (file)
@@ -48,10 +48,11 @@ void output_html(char *charset) {
                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);
@@ -62,10 +63,13 @@ void output_html(char *charset) {
 
 #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) ) {