Re: String Encodings - loose guidelines
| From: | Donovan Brooke | Date: | Fri, 28 Jan 2011 18:25:46 +0000 |
| Subject: | Re: String Encodings - loose guidelines | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311071@lists.php.net to get a copy of this message | ||
Marc Guay wrote:
Thanks for the heads up! Donovan -- D Brooke1.) Saving strings to a databaseOne thing I always forget to remember is to send tge "SET NAMES utf8" command to MySQL after making a connection. This will save you 1000 headaches if you're working with non-latin characters. I can't count the number of times I've thrown htmlentities, htmlspecialchars, utf8_encode/decode/, stripslashes, etc, etc around trying to figure out why those É's aren't being saved or read properly. I imagine this might fall into the category of "best practice". Marc