Re: dealing with accents in your databases (or to entity or not to entity...)

From: Date: Mon, 03 Feb 2003 17:12:19 +0000
Subject: Re: dealing with accents in your databases (or to entity or not to entity...)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134147@lists.php.net to get a copy of this message
> This hasn't come up too much yet in one of the databases on my site, but as > I get closer to starting a big project, I thought I'd get an idea of how the > rest of you handle this. > > How do you handle accented words and other problematic symbols on your > database-driven sites? If you need to store one, do you store it as the > actual character and display it with htmlentities, or do you store it as the > html entity? In other words, do most of you store "Law & Order" in your > database or "Law & Order"? "Renée" or "Renée" > > What are the pros and cons of storing them in the database in either format? One other thing to mention... searching. If you search your database, make sure you make the search string match the encoding of your database. So if you store the data encoded, then the search string has to be encoded, too. Seems obvious, but I could imagine it tripping someone up for a while until they figured it out. ---John Holmes...

« previous php.general (#134147) next »