Re: PHP 5.1

From: Date: Wed, 02 Feb 2005 03:09:02 +0000
Subject: Re: PHP 5.1
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-14504@lists.php.net to get a copy of this message
On Wed, 02 Feb 2005 02:00:12 +0100, in php.internals cschneid@cschneid.com (Christian Schneider) wrote: >Stupid question: Is it safe to pass a variable containing UTF8 to a >ASCII function like exec()? I think to remember that the encoding makes >sure that the encoding ensures that none of the ASCII characters will be >contained in the string as part of a multibyte encoded character, right? Well, if the UTF-8 data is valid (which I suppose would be validated the same was as any UTF-8-supported function validates it) then all bytes that make up the UTF-8-character will be in range of 0x80 and 0xF7. That's the nice thing about UTF-8 - no character with code points above 128 will produce bytes where the uppermost bit is zero (0x00 to 0x7F) -- - Peter Brodersen

« previous php.internals (#14504) next »