httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1414161 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c
Date Tue, 27 Nov 2012 12:50:37 GMT
Author: rjung
Date: Tue Nov 27 12:50:36 2012
New Revision: 1414161

URL: http://svn.apache.org/viewvc?rev=1414161&view=rev
Log:
Error log shows that conversion from "utf8" to
"utf-8" is a common unhandled case, at least on
FreeBSD (there seems to be no alias for "utf8").

Implement it as a copy operation.

Modified:
    httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c?rev=1414161&r1=1414160&r2=1414161&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c Tue Nov 27 12:50:36 2012
@@ -256,6 +256,13 @@ apr_status_t mbox_cte_convert_to_utf8(ap
     char *dst;
     if (len <= 0)
         return APR_SUCCESS;
+    /* Special case "utf8": it is often unknown (no alias) */
+    if (!strcmp(charset, "utf8")) {
+        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, ap_server_conf,
+                     "Shortcut for convset 'utf8'");
+        ap_varbuf_strmemcat(vb, src, len);
+        return APR_SUCCESS;
+    }
     rv = apr_xlate_open(&convset, "UTF-8", charset, p);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,



Mime
View raw message