php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49406 utf8_decode(): Include "caution" note that it destroys 99.9% of all characters
Submitted: 2009-08-29 15:22 UTC Modified: 2009-11-13 22:40 UTC
From: thomas at landauer dot at Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2009-08-29 15:22 UTC] thomas at landauer dot at
Description:
------------
From the 1,114,112 (possible) Unicode-characters, only 256 are converted correctly. The remaining 99.9 percent are destroyed (i.e. "converted" into a question mark), since they don't exist in ISO 8859-1.

My suggestion: Explicitly state this fact in a red "caution" box in the funciton's documentation.

This would also prevent "bugs" like this one here from being reported:
See http://bugs.php.net/bug.php?id=36138&edit=2



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-30 19:33 UTC] jani@php.net
There is no such OS called "All".
 [2009-11-13 22:40 UTC] vrana@php.net
It's clearly stated that the function converts a string with ISO-8859-1 characters encoded with UTF-8.
 [2010-08-30 20:10 UTC] andrey@php.net
Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&revision=302901
Log: Fix for MySQL Bug #49406
Binding params doesn't work when selecting a date inside a CASE-WHEN
(http://bugs.mysql.com/bug.php?id=49406)
The MySQL server sends MYSQL_TYPE_NEWDATE values as clear text, even
when PS are used and thus the binary protocol are used. Changing the
handler for the type.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC