Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Inserting Data into Table Re: Inserting Data into Table

#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.