Default locations per country for Maxmind

Maxmind is a cool company that offers location services for a small monthly fee. In addition, they offer a subset of the databases their services use to the public under an Open Source creative commons attribution licenses. If you download and load one of these databases, you’ll be able to do IP to location lookups. Cool stuff!

Geolocation

For Bridal App, the platform for the bridal industry that I’ve been working on, we want to show the visitor those bridal dresses that are actually available in their area. For highly detailed location data (provided by theĀ W3C Geolocation Api) we need to ask the user’s permission, but we can get a rough estimate of where the visitor is based on their IP address so we can start out at least somewhere in the right area.

Continue reading

Use MySQL utf8mb4 if you want full Unicode support

MySQL’s utf8 is broken

MySQL really made a mess here. What they are calling utf8 really isn’t. Hidden away in the MySQL manual we can read this:

“The character set named utf8 uses a maximum of three bytes per character and contains only BMP characters.”

Loosely translated: MySQL utf8 is broken. Don’t use it.

MySQL-logo

Continue reading