Bug #64659 [Opn->Nab]: Encode Error: accented chars returns empty string
| From: | rasmus@php.net | Date: | Wed, 17 Apr 2013 16:54:27 +0000 |
| Subject: | Bug #64659 [Opn->Nab]: Encode Error: accented chars returns empty string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-178510@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64659&edit=1
ID: 64659
Updated by: rasmus@php.net
Reported by: luis dot pessoa67 at ibest dot com dot br
Summary: Encode Error: accented chars returns empty string
-Status: Open
+Status: Not a bug
Type: Bug
Package: Strings related
Operating System: Windows 7 SP1
PHP Version: 5.4.14
Block user comment: N
Private report: N
New Comment:
The documentation clearly states:
5.4.0 The default value for the encoding parameter was changed to UTF-8.
Previous Comments:
------------------------------------------------------------------------
[2013-04-17 15:59:58] luis dot pessoa67 at ibest dot com dot br
I saw php 5.4.14 this bugs should be corrected (Fixed bug #64011).
------------------------------------------------------------------------
[2013-04-17 15:54:36] luis dot pessoa67 at ibest dot com dot br
Environment Information:
System Windows NT LUIS 6.1 build 7601 (Windows 7 Business Edition Service Pack 1) i586
Build Date Apr 10 2013 21:15:43
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build"
"--enable-debug-pack" "--disable-zts" "--disable-isapi"
"--disable-nsapi" "--without-mssql" "--without-pdo-mssql"
"--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared"
"--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared"
"--with-enchant=shared" "--enable-object-out-dir=../obj/"
"--enable-com-dotnet=shared" "--with-mcrypt=static"
"--disable-static-analyze" "--with-pgo"
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\php\php.ini
---------
my php.ini charset defs:
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "iso-8859-1"
------------------------------------------------------------------------
[2013-04-17 15:44:58] luis dot pessoa67 at ibest dot com dot br
Description:
------------
1) First script
php -r "print(htmlentities('ú', ENT_COMPAT, 'ISO-8859-1'));"
results: ú
expected: ú
[OK]
2) Second script
php -r "print(htmlentities('ú'));"
results:
expected: ú
[Error]
3) According documentation
quote_style: ENT_COMPAT (default)
charset: ISO-8859-1 (default)
---
From manual page: http://www.php.net/function.htmlentities#refsect1-function.htmlentities-returnvalues
---
Test script:
---------------
php -r "print(htmlentities('ú'));"
Expected result:
----------------
ú
Actual result:
--------------
string with lenght=0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64659&edit=1