diff options
Diffstat (limited to 'usr.sbin/httpd/src/helpers/GuessCodeset')
-rw-r--r-- | usr.sbin/httpd/src/helpers/GuessCodeset | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.sbin/httpd/src/helpers/GuessCodeset b/usr.sbin/httpd/src/helpers/GuessCodeset new file mode 100644 index 00000000000..b761efb3150 --- /dev/null +++ b/usr.sbin/httpd/src/helpers/GuessCodeset @@ -0,0 +1,15 @@ +#!/bin/sh +# This script tries to find out whether the native codeset of this machine +# is ASCII or EBCDIC. On EBCDIC based machines, it is used to activate +# the mod_ebcdic EBCDIC conversion module. +# +# Note: This script will break if you use an ebcdic cross-compiler! +# +case `${AWK-awk} 'BEGIN {printf("%c%c%c%c%c<->%c%c%c%c%c%c\n",97,115,99,105,105,133,130,131,132,137,131);}' /dev/null` in + ascii*) echo ASCII;; + *ebcdic) echo EBCDIC;; + *) echo >&2 "ERROR: Your platform codeset could not be detected correctly." + echo >&2 "Assuming ASCII. Please send an EMail to <martin@apache.org>" + echo >&2 "describing the platform in use. Is your AWK broken?" + echo ASCII;; +esac |