Why is There a  in my MySQL Database?

By | February 4, 2016

Data submitted to a database via AJAX or other means sometimes includes a non-breaking space ( ). How this entity is displayed depends on the character encoding of the database and its tables.

Using the default Latin1 encoding, a non-breaking space is displayed as this little funny character right here -> Â

To have it displayed as an empty space, change the encoding scheme from Latin1 to UTF-8 (Unicode).

Set the default character sets on the database. This does not convert existing tables, it only sets the default for newly created tables.

Next, convert the character set on all existing tables and their columns. In my experience, this has changed the existing  characters into blank spaces.

References

http://stackoverflow.com/questions/4857778/when-to-use-utf-8-and-when-to-use-latin1-in-mysql

Leave a Reply

Your email address will not be published.

*