From: Jeff Trawick Date: Wed, 14 Jun 2000 20:38:32 +0000 (+0000) Subject: Add support to ap_xlate_open() for an app to specify that the X-Git-Tag: APACHE_2_0_ALPHA_5~330 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8df8ca51e35ac16ef9d0b0935892aa5b1926c8f9;p=apache Add support to ap_xlate_open() for an app to specify that the charset of the locale is to be used for the source or target charset. At EBCDIC initialization, use the locale charset as one of the pair when setting up the default translation handles for content. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85571 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_ebcdic.c b/server/util_ebcdic.c index 22d41cd01d..c319f97607 100644 --- a/server/util_ebcdic.c +++ b/server/util_ebcdic.c @@ -84,8 +84,19 @@ ap_status_t ap_init_ebcdic(ap_pool_t *pool) return rv; } - ap_locale_to_ascii = ap_hdrs_to_ascii; /* TODO: "ISO8859-1" to APR_LOCALE_CHARSET */ - ap_locale_from_ascii = ap_hdrs_from_ascii; /* TODO: APR_LOCALE_CHARSET to "ISO8859-1" */ + rv = ap_xlate_open(&ap_locale_to_ascii, "ISO8859-1", APR_LOCALE_CHARSET, pool); + if (rv) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, + "ap_xlate_open() failed"); + return rv; + } + + rv = ap_xlate_open(&ap_locale_from_ascii, APR_LOCALE_CHARSET, "ISO8859-1", pool); + if (rv) { + ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, + "ap_xlate_open() failed"); + return rv; + } rv = ap_MD5InitEBCDIC(ap_hdrs_to_ascii); if (rv) {