|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-08-23 15:28 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 09:00:01 2025 UTC |
I have a database where some of the strings contain HTML entities (such as "é"). When I used MySQL directly, it retrieves those entries correctly, showing the coding for the characters. However, PHP on retrieval converts them to the meta-ASCII equivalents ("?"). I know I can use htmlentities() to convert back - except that this doesn't work when I want to use the item for a furher MySQL search in cases like the entity above, since PHP will convert it back to "é" instead of "é", and then the string won't match. IMHO, the initial translation PHP is doing on retrieval from MySQL is inappropriate, since it both hinders further use of the string with MySQL, and isn't good HTML either - despite having been perfectly good HTML while sitting in the database.