Home › Forums › Back End › Inserting Data into Table › Re: Inserting Data into Table
July 2, 2013 at 1:56 am
#141251
Participant
damn smartquotes.
IIRC, you _did_ make sure your DB table uses `DEFAULT CHARSET=utf8`, correct? This problem is probably being caused by the actual _connection_ to MySQL using a different charset.
##Charsets Are A Pain In The Butt.
Check:
… the character encoding readability.com returns the data in
… the character encoding used by your php script
… the character encoding used by your database table
… the character encoding used by your database connection
In all likelihood, your connection is using `latin1`. Add this right after you connect:
$DB->set_charset( ‘utf8’ );
I updated the gist.