Re: Re: PHP Unicode support design document
| From: | Derick Rethans | Date: | Wed, 10 Aug 2005 11:01:23 +0000 |
| Subject: | Re: Re: PHP Unicode support design document | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17777@lists.php.net to get a copy of this message | ||
On Wed, 10 Aug 2005, Ron Korving wrote:
> "In order to create binary string literals, a new syntax is necessary:
> prefixing a string literal with letter 'b' creates a binary string."
>
> The b-prefix for binary strings is great, but how does that work with a
> function like file_get_contents() or fread() ?
> One can't do: $data = bfile_get_contents("somefile.bin");
fopen() and file_get_contents() already understands a context parameter,
specifying whethter you'd want to have binary or string/unicode data can
be done through that.
and the b syntax, only works for literal strings in your code:
b"foo", but b$foo is not going to work.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org