Possible automatic encoding of characters when inserting them using mysqli statements
| From: | Jacob Kruger | Date: | Fri, 12 Jun 2015 22:09:53 +0000 |
| Subject: | Possible automatic encoding of characters when inserting them using mysqli statements | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-31338@lists.php.net to get a copy of this message | ||
I am working on my own version of a relatively simplistic CMS, and when, for example, I insert the
relative path to an image into the mysql 5.0 database, it's, for example, converting/encoding
the / character into %2F.
This is handled using prepared mysqli statements, and passing the values through as bound parameter
values.
Now I can easily enough do a str_ireplace() function call on the value when then retrieving it,
before rendering it for output, but, would prefer to avoid specifically doing a search/replace on a
few specific character values, just in case there's something that haven't noticed as of
yet that might cause a further issue later on.
In other words, am trying to remember what the relevant function would be to call to handle the
conversion of the encoded character back to the original one at run time?
TIA
Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."