]> granicus.if.org Git - apache/commitdiff
Add support to ap_xlate_open() for an app to specify that the
authorJeff Trawick <trawick@apache.org>
Wed, 14 Jun 2000 20:38:32 +0000 (20:38 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 14 Jun 2000 20:38:32 +0000 (20:38 +0000)
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

server/util_ebcdic.c

index 22d41cd01d3483982041469a377c5b03ad9a7d86..c319f9760739b2486741f874094d8908143a5b1e 100644 (file)
@@ -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) {