ID: 38105
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Unicode Engine related
PHP Version: 6CVS-2006-07-14 (CVS)
Assigned To: pollita
New Comment:
More problems:
$str = b"abcdef";
file_put_contents('str.txt', $str);
Result is (escaped):
<E6><89><A1><E6><91><A3><E6><99><A5><E8><90><80><E8><BF><8C><E2><A8><AA>
Previous Comments:
------------------------------------------------------------------------
[2006-07-14 20:51:20] [EMAIL PROTECTED]
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2006-07-14 17:05:05] [EMAIL PROTECTED]
Description:
------------
Streams encodings don't seem to work as advertised.
Reproduce code:
---------------
code
----
file_put_contents('abcdef', 'str.txt', FILE_TEXT);
php.ini
-------
unicode.semantics = on
unicode.output_encoding = utf-8
unicode.runtime_encoding = iso-8859-1
unicode.script_encoding = utf-8
unicode.filesystem_encoding = utf-8
Expected result:
----------------
No stdout output and 6 chars in UTF-8 in str.txt.
Actual result:
--------------
Notice: file_put_contents(): 7 character unicode buffer downcoded for
binary stream runtime_encoding in /home/andrei/dev/php-src/q.php on
line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38105&edit=1