# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for mod_chxj 0.12.18.
#
+# Report bugs to <konn@users.sourceforge.jp>.
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
PACKAGE_TARNAME='mod_chxj'
PACKAGE_VERSION='0.12.18'
PACKAGE_STRING='mod_chxj 0.12.18'
-PACKAGE_BUGREPORT=''
+PACKAGE_BUGREPORT='konn@users.sourceforge.jp'
ac_unique_file="src/mod_chxj.c"
# Factoring default headers for most tests.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to <konn@users.sourceforge.jp>.
_ACEOF
ac_status=$?
fi
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4462 "configure"' > conftest.$ac_ext
+ echo '#line 4465 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7188: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7196: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7192: \$? = $ac_status" >&5
+ echo "$as_me:7200: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7456: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7464: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7460: \$? = $ac_status" >&5
+ echo "$as_me:7468: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7560: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7568: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7564: \$? = $ac_status" >&5
+ echo "$as_me:7572: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9857 "configure"
+#line 9865 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9957 "configure"
+#line 9965 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12293: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12301: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12297: \$? = $ac_status" >&5
+ echo "$as_me:12305: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12397: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12405: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12401: \$? = $ac_status" >&5
+ echo "$as_me:12409: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13958: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13966: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13962: \$? = $ac_status" >&5
+ echo "$as_me:13970: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14062: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14070: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14066: \$? = $ac_status" >&5
+ echo "$as_me:14074: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16249: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16257: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16253: \$? = $ac_status" >&5
+ echo "$as_me:16261: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16517: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16525: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16521: \$? = $ac_status" >&5
+ echo "$as_me:16529: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16621: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16629: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16625: \$? = $ac_status" >&5
+ echo "$as_me:16633: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to konn@users.sourceforge.jp ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
if (result == (size_t)(-1)) {
if (E2BIG == errno) {
ERR(r, "There is not sufficient room at *outbuf.");
+ break;
}
else if (EILSEQ == errno) {
- ERR(r, "An invalid multibyte sequence has been encountered in the input. input:[%s]", ibuf);
+ ERR(r, "%s:%d An invalid multibyte sequence has been encountered in the input. input:[%s]", __FILE__,__LINE__,ibuf);
+ chxj_convert_illegal_charactor_sequence(r, entryp, &ibuf, &ilen, &obuf, &olen);
}
else if (EINVAL == errno) {
ERR(r, "An incomplete multibyte sequence has been encountered in the input. input:[%s]", ibuf);
+ break;
}
- break;
}
}
*len = strlen(spos);
}
+void
+chxj_convert_illegal_charactor_sequence(request_rec *r, chxjconvrule_entry *entryp, char **ibuf, apr_size_t *ilen, char **obuf, apr_size_t *olen)
+{
+ if (STRCASEEQ('u','U',"UTF-8", entryp->encoding) || STRCASEEQ('u','U',"UTF8", entryp->encoding)) {
+ if ((0xe0 & **ibuf) == 0xc0) {
+ /* 2byte charactor */
+ **obuf = '?';
+ *obuf += 1;
+ *olen -= 1;
+ *ibuf += 2;
+ DBG(r, "passed 2byte.");
+ }
+ else if ((0xf0 & **ibuf) == 0xe0) {
+ /* 3byte charactor */
+ **obuf = '?';
+ *obuf += 1;
+ *olen -= 1;
+ *ibuf +=3;
+ DBG(r, "passed 3byte.");
+ }
+ else if ((0xf8 & **ibuf) == 0xf0) {
+ /* 4byte charactor */
+ **obuf = '?';
+ *obuf += 1;
+ *olen -= 1;
+ *ibuf +=4;
+ DBG(r, "passed 4byte.");
+ }
+ else if ((0xc0 & **ibuf) == 0x80) {
+ /* 1byte charactor */
+ **obuf = '?';
+ *obuf += 1;
+ *olen -= 1;
+ *ibuf += 1;
+ DBG(r, "passed 1byte.");
+ }
+ if (ibuf && *ibuf) {
+ *ilen = strlen(*ibuf);
+ DBG(r, "new len = [%d].", *ilen);
+ }
+ }
+}
+
+
char *
chxj_rencoding(request_rec *r, const char *src, apr_size_t *len)
{
if (result == (size_t)(-1)) {
if (E2BIG == errno) {
ERR(r, "There is not sufficient room at *outbuf");
+ break;
}
else if (EILSEQ == errno) {
ERR(r, "An invalid multibyte sequence has been encountered in the input. input:[%s]", ibuf);
+ chxj_convert_illegal_charactor_sequence(r, entryp, &ibuf, &ilen, &obuf, &olen);
}
else if (EINVAL == errno) {
ERR(r, "An incomplete multibyte sequence has been encountered in the input. input:[%s]", ibuf);
+ break;
}
- break;
}
}