web2py/web2py — pull request #124 by oliveiraev (2013-07-04 16:59:02+00:00)
Title: Adding some charsets

Newer versions of MySQL have more UTF-8 collations in addition to the new utf8_mb4 family.

For some additional information about utf8_mb4, please refer to [the manual](http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html).

In my case, my server is configured to use utf8mb4_unicode_ci as default collation. This was raising a ```KeyError: 224``` during the connection attempts.

The command to retrieve the list was slightly modified as follows
``` bash
mysql -N -s -e"select id, character_set_name, collation_name, concat(\"'\", is_default, \"'\") from information_schema.collations order by id" | xargs printf "_charsets.add(Charset(%s, '%s', '%s', '%s'))\n"
```
but the output is quite same and I didn't removed the present instructions.

Hope it helps.