[PHP-DEV] ��¶١ Licensed Windows XP Pro, win 98, 98 se, Office XP Small, Office

2006-06-21 Thread ����
¢Ò¶١ Licensed Windows XP Pro, win 98, 98 se, Office XP Small, Office XP Professional, Office Pro 2003 ¶Ù¡ÁÒ¡ ¢Í§á·éá¹è¹Í¹ 100 % µÔ´µèÍ Paisarn 06-5881135 - Windows 95 ẺÁÕ CD ¤ÃºªØ´ 200 bath - Windows 98 book+COA only 800 bath - Windows 98 book+COA+

[PHP-DEV] strlen() under unicode.semantics

2006-06-21 Thread Daniel Convissor
Hi: Enjoyed Andrei's talk at the NYPHP Conference last week about unicode in PHP 6. He mentioned that when unicode.semantics is on, strlen() will return the number of characters rather than the number of bytes, like mb_string() does or strlen() if mbstring.func_overload is on. The hitch here

[PHP-DEV] php_compat.h XML clean up

2006-06-21 Thread Brian J. France
I think the xml stuff in php_compat.h needs some attention. The gd defines need moved out side of the xml stuff and only things from expat_compat.h need compat'ed. This patch is what I was thinking: http://www.brianfrance.com/software/php/php_compat.h.patch This also adds one that is used b

[PHP-DEV] Re: strlen() under unicode.semantics

2006-06-21 Thread Sara Golemon
> Enjoyed Andrei's talk at the NYPHP Conference last week about unicode in > PHP 6. He mentioned that when unicode.semantics is on, strlen() will > return the number of characters rather than the number of bytes, like > mb_string() does or strlen() if mbstring.func_overload is on. > > The hitch he

RE: [PHP-DEV] Re: strlen() under unicode.semantics

2006-06-21 Thread Jared Williams
> > > Enjoyed Andrei's talk at the NYPHP Conference last week > about unicode in > > PHP 6. He mentioned that when unicode.semantics is on, > strlen() will > > return the number of characters rather than the number of > bytes, like > > mb_string() does or strlen() if mbstring.func_overload is

Re: [PHP-DEV] Re: Unicode conversion exceptions and memory leaks

2006-06-21 Thread Andrei Zmievski
I hope that my latest commits makes both camps happy. The handler signature is actually: function my_handler($direction, $encoding, $char_or_byte, $offset, $message) { .. } -Andrei On Apr 19, 2006, at 2:32 PM, Andrei Zmievski wrote: I've had some time to think about this and Derick and I

[PHP-DEV] Fw: cvs: php-src(PHP_5_2) /main/streams streams.c

2006-06-21 Thread Nuno Lopes
Not sure why this didn't get through.. - Original Message - Hi, > @@ -1216,7 +1216,7 @@ > > p = php_stream_mmap_range(src, php_stream_tell(src), > maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped); > > - if (p) { > + if (p && mapped) { >

Re: [PHP-DEV] Re: strlen() under unicode.semantics

2006-06-21 Thread Sara Golemon
What happens with $fp = fopen('foo.bin', 'wb'); $written = fwrite($fp, $str); if (strlen($str) != $written) { echo 'Not written', "\n"; } Assuming $str is a binary string. The above code works just fine. If it's a unicode string: Short version: Don't do that. Writing a unicode string to a