Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3F8FEB59 for ; Tue, 27 Nov 2012 12:50:59 +0000 (UTC) Received: (qmail 45833 invoked by uid 500); 27 Nov 2012 12:50:59 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 45779 invoked by uid 500); 27 Nov 2012 12:50:59 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 45759 invoked by uid 99); 27 Nov 2012 12:50:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2012 12:50:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2012 12:50:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 28B09238890B; Tue, 27 Nov 2012 12:50:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1414161 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_cte.c Date: Tue, 27 Nov 2012 12:50:37 -0000 To: cvs@httpd.apache.org From: rjung@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121127125038.28B09238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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,