andrei Tue Dec 12 18:24:16 2006 UTC
Modified files:
/php-src/ext/standard basic_functions.c
Log:
Do not convert args to Unicode in getopt(), they should stay binary.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.831&r2=1.832&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.831
php-src/ext/standard/basic_functions.c:1.832
--- php-src/ext/standard/basic_functions.c:1.831 Sun Dec 10 01:24:13 2006
+++ php-src/ext/standard/basic_functions.c Tue Dec 12 18:24:16 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.831 2006/12/10 01:24:13 edink Exp $ */
+/* $Id: basic_functions.c,v 1.832 2006/12/12 18:24:16 andrei Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4497,7 +4497,7 @@
/* }}} */
#endif
-/* {{{ proto array getopt(string options [, array longopts])
+/* {{{ proto array getopt(string options [, array longopts]) U
Get options from the command line argument list */
PHP_FUNCTION(getopt)
{
@@ -4634,7 +4634,8 @@
MAKE_STD_ZVAL(val);
if (optarg != NULL) {
- ZVAL_RT_STRING(val, optarg, 1);
+ /* keep the arg as binary, since the encoding is not
known */
+ ZVAL_STRING(val, optarg, 1);
} else {
ZVAL_FALSE(val);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php