Skip to content

Tag Archives: Charset

UTF-8 Special Character Problems With MySQL

26-Jun-07

Short version:
Always use a query
SET NAMES <charset>
for instance, I used
SET NAMES utf8
before accessing the database. Preferably add it right after connecting to the database.
Long version:
For a several months I've been fighting with character sets. For some reason querying a UTF-8 MySQL database gave me different results than showing the database contents in phpMyAdmin or CocoaMySQL. [...]