Date: 03/09/01
- Next message: alt <email protected>: "[PHP-DEV] PHP 4.0 Bug #9659: sapi servlet crashes when exceptions thrown in java code"
- Previous message: alt <email protected>: "[PHP-DEV] PHP 4.0 Bug #9658: saps Servlet reproducible crash."
- Next in thread: Rui Hirokawa: "Re: [PHP-DEV] iconv patch..."
- Reply: Rui Hirokawa: "Re: [PHP-DEV] iconv patch..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think that UTF-8 is better choice as default encoding ;-) And because I
couldn't compile this module, I have added php_iconv_init_globals and put
it in ZEND_INIT_MODULE_GLOBALS. (I have inspired by mysql module, so this
shouldn't be neccessary correct.)
ondrej <email protected>:~/Projects/php/php-4.0.5/ext/iconv$ cvs diff -u php_iconv.h iconv.c
Index: php_iconv.h
===================================================================
RCS file: /repository/php4/ext/iconv/php_iconv.h,v
retrieving revision 1.3
diff -u -u -r1.3 php_iconv.h
--- php_iconv.h 2001/02/26 06:06:57 1.3
+++ php_iconv.h 2001/03/09 17:24:40
@@ -61,9 +61,9 @@
#define ICONVLS_FETCH()
#endif
-#define ICONV_INPUT_ENCODING "ISO-8859-1"
-#define ICONV_OUTPUT_ENCODING "ISO-8859-1"
-#define ICONV_INTERNAL_ENCODING "ISO-8859-1"
+#define ICONV_INPUT_ENCODING "UTF-8"
+#define ICONV_OUTPUT_ENCODING "UTF-8"
+#define ICONV_INTERNAL_ENCODING "UTF-8"
#endif /* PHP_ICONV_H */
Index: iconv.c
===================================================================
RCS file: /repository/php4/ext/iconv/iconv.c,v
retrieving revision 1.7
diff -u -u -r1.7 iconv.c
--- iconv.c 2001/02/26 15:41:38 1.7
+++ iconv.c 2001/03/09 17:24:41
@@ -1,3 +1,4 @@
+
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
@@ -76,10 +77,16 @@
STD_PHP_INI_ENTRY("iconv.internal_encoding", ICONV_INTERNAL_ENCODING, PHP_INI_ALL,
OnUpdateString, internal_encoding, zend_iconv_globals, iconv_globals)
PHP_INI_END()
+static void php_iconv_init_globals(zend_iconv_globals *iconv_globals)
+{
+ iconv_globals->input_encoding = ICONV_INPUT_ENCODING;
+ iconv_globals->output_encoding = ICONV_OUTPUT_ENCODING;
+ iconv_globals->internal_encoding = ICONV_INTERNAL_ENCODING;
+}
PHP_MINIT_FUNCTION(iconv)
{
- ZEND_INIT_MODULE_GLOBALS(iconv, NULL, NULL);
+ ZEND_INIT_MODULE_GLOBALS(iconv, php_iconv_init_globals, NULL);
REGISTER_INI_ENTRIES();
return SUCCESS;
}
-- Ondřej Surý <ondrej <email protected>> Globe Internet s.r.o. http://globe.cz/ Tel: +420235365000 Fax: +420235365009 Pláničkova 1, 162 00 Praha 6 Mob: +420605204544 ICQ: 24944126 Mapa: http://globe.namape.cz/ GPG fingerprint: CC91 8F02 8CDE 911A 933F AE52 F4E6 6A7C C20D F273-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: alt <email protected>: "[PHP-DEV] PHP 4.0 Bug #9659: sapi servlet crashes when exceptions thrown in java code"
- Previous message: alt <email protected>: "[PHP-DEV] PHP 4.0 Bug #9658: saps Servlet reproducible crash."
- Next in thread: Rui Hirokawa: "Re: [PHP-DEV] iconv patch..."
- Reply: Rui Hirokawa: "Re: [PHP-DEV] iconv patch..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

