cvs: php-src /ext/iconv iconv.c
| From: | Michael Wallner | Date: | Thu, 07 Sep 2006 14:20:16 +0000 |
| Subject: | cvs: php-src /ext/iconv iconv.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40378@lists.php.net to get a copy of this message | ||
mike Thu Sep 7 14:20:16 2006 UTC
Modified files:
/php-src/ext/iconv iconv.c
Log:
- use ucnv_compareNames
- check output_context->op for PHP_OUTPUT_HANDLER_CLEAN instead of php_output_get_status()
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.141&r2=1.142&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.141 php-src/ext/iconv/iconv.c:1.142
--- php-src/ext/iconv/iconv.c:1.141 Wed Sep 6 20:49:03 2006
+++ php-src/ext/iconv/iconv.c Thu Sep 7 14:20:16 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iconv.c,v 1.141 2006/09/06 20:49:03 mike Exp $ */
+/* $Id: iconv.c,v 1.142 2006/09/07 14:20:16 mike Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -341,7 +341,7 @@
if (UG(unicode)) {
output_encoding = INI_STR("unicode.output_encoding");
- if (output_encoding && *output_encoding &&
strcasecmp(INI_STR("unicode.output_encoding"), ICONVG(internal_encoding))) {
+ if (output_encoding && *output_encoding && ucnv_compareNames(output_encoding,
ICONVG(internal_encoding))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unicode.output_encoding differs from
iconv.internal_encoding (%s, %s)", output_encoding, ICONVG(internal_encoding));
efree(ICONVG(input_encoding));
ICONVG(input_encoding) = estrdup(output_encoding);
@@ -359,7 +359,7 @@
mimetype = SG(default_mimetype) ? SG(default_mimetype) : SAPI_DEFAULT_MIMETYPE;
}
- if (mimetype != NULL && !(output_status & PHP_OUTPUT_HANDLER_CLEAN)) {
+ if (mimetype != NULL && !(output_context->op & PHP_OUTPUT_HANDLER_CLEAN)) {
spprintf(&content_type, 0, "Content-Type: %.*s; charset=%s",
mimetype_len?mimetype_len:strlen(mimetype), mimetype, ICONVG(output_encoding));
if (content_type && SUCCESS == sapi_add_header(content_type, strlen(content_type), 0)) {
SG(sapi_headers).send_default_content_type = 0;