From: Antony Dovgal Date: Wed, 21 May 2008 15:03:11 +0000 (+0000) Subject: use macros instead of hardcoded encoding names X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1701 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2953951544dbe169bba710e236084d7103993fb8;p=php use macros instead of hardcoded encoding names (%$#@# AIX is totally broken..) --- diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index ccad55e907..f3b38f9339 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -225,7 +225,7 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c /* }}} */ /* {{{ static globals */ -static char _generic_superset_name[] = "UCS-4LE"; +static char _generic_superset_name[] = ICONV_UCS4_ENCODING; #define GENERIC_SUPERSET_NAME _generic_superset_name #define GENERIC_SUPERSET_NBYTES 4 /* }}} */ diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index b1c2cfdd5c..9c159bd999 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -82,11 +82,13 @@ ZEND_END_MODULE_GLOBALS(iconv) # define ICONV_OUTPUT_ENCODING "ISO8859-1" # define ICONV_INTERNAL_ENCODING "ISO8859-1" # define ICONV_ASCII_ENCODING "IBM-850" +# define ICONV_UCS4_ENCODING "UCS-4" #else # define ICONV_INPUT_ENCODING "ISO-8859-1" # define ICONV_OUTPUT_ENCODING "ISO-8859-1" # define ICONV_INTERNAL_ENCODING "ISO-8859-1" # define ICONV_ASCII_ENCODING "ASCII" +# define ICONV_UCS4_ENCODING "UCS-4LE" #endif #ifndef ICONV_CSNMAXLEN