Re: cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h
| From: | Andrei Zmievski | Date: | Thu, 28 Sep 2006 16:43:50 +0000 |
| Subject: | Re: cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-40759@lists.php.net to get a copy of this message | ||
Hi Georg,
A couple more notes.
1. This can be simplified:
if (UG(unicode)) {
zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, row[i], field_len[i] TSRMLS_CC);
ZVAL_UNICODEL(res, ustr, ulen, 0);
} else {
ZVAL_STRINGL(res, row[i], field_len[i], 1);
}
Use ZVAL_UTF8_STRINGL(res, row[i], field_len[i], ZSTR_DUPLICATE)
2. This also:
ZVAL_UTF8_STRINGL(return_value, strerr, strlen(strerr), ZSTR_DUPLICATE);
to:
RETURN_UTF8_STRINGL(strerr, strlen(strerr), ZSTR_DUPLICATE);
3. As well as this:
if (UG(unicode)) {
zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, (field->name) ? field->name : "",
(field->name) ? strlen(field->name) : 0 TSRMLS_CC);
add_property_unicodel(value, "name", ustr, ulen, 0);
} else {
add_property_string(value, "name", (field->name) ? field->name : "", 1);} Use add_property_utf8_string(): add_property_utf8_string(value, "name", (field->name) ? field->name : "", ZSTR_DUPLICATE); Also, I don't know much about MySQL client library, but it seems that it only works in UTF-8 mode. Is this correct? Does it translate UTF-8 to other charsets when communicating with server that has tables in those other charsets? -Andrei On Sep 27, 2006, at 8:25 AM, Georg Richter wrote:
georg Wed Sep 27 15:25:52 2006 UTC
Modified files:
/php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c
mysqli_nonapi.c mysqli_prop.c php_mysqli.h
Log:
ZTS fixes. Implemented Andrei's hints (simplifying unicode stuff)
<georg-20060927152552.txt>--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php