cvs: php-src /ext/unicode unicode_filter.c
| From: | Sara Golemon | Date: | Thu, 25 Aug 2005 08:59:26 +0000 |
| Subject: | cvs: php-src /ext/unicode unicode_filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33639@lists.php.net to get a copy of this message | ||
pollita Thu Aug 25 04:59:26 2005 EDT
Modified files:
/php-src/ext/unicode unicode_filter.c
Log:
sizeof(char) != sizeof(UChar) Don't tell ucnv_toUnicode it has more space than it really
does
http://cvs.php.net/diff.php/php-src/ext/unicode/unicode_filter.c?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/unicode/unicode_filter.c
diff -u php-src/ext/unicode/unicode_filter.c:1.2 php-src/ext/unicode/unicode_filter.c:1.3
--- php-src/ext/unicode/unicode_filter.c:1.2 Fri Aug 12 05:10:04 2005
+++ php-src/ext/unicode/unicode_filter.c Thu Aug 25 04:59:24 2005
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: unicode_filter.c,v 1.2 2005/08/12 09:10:04 sniper Exp $ */
+/* $Id: unicode_filter.c,v 1.3 2005/08/25 08:59:24 pollita Exp $ */
#include "php.h"
@@ -144,7 +144,7 @@
destp = destbuf = (UChar *)pemalloc(destlen, data->is_persistent);
- ucnv_toUnicode(data->conv, &destp, destbuf + destlen, (const char**)&src, src +
remaining, NULL, FALSE, &errCode);
+ ucnv_toUnicode(data->conv, &destp, (UChar*)((char*)destbuf + destlen), (const
char**)&src, src + remaining, NULL, FALSE, &errCode);
new_bucket = php_stream_bucket_new_unicode(stream, destbuf, destp - destbuf, 1,
data->is_persistent TSRMLS_CC);
php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);