4teamwork/opengever.core — pull request #599 by phgross (2014-10-03 13:31:38+00:00)
Title: Fixed encoding issues in the `EmailContactsAndUsersVocabularyFactory`.

Fixes #594

The key and the value should always return unicode.
Because of our mysql connection string `mysql://opengever:opengever@localhost/opengever?charset=utf8"` this is guaranteed for all `OGDS` objects. For the contacts we had to decode some attributes.

--
MySQLdb requires a “charset” parameter to be passed in order for it to handle non-ASCII characters correctly. When this parameter is passed, MySQLdb will also implicitly set the “use_unicode” flag to true, which means that it will return Python unicode objects instead of bytestrings (See http://docs.sqlalchemy.org/en/latest/dialects/mysql.html#module-sqlalchemy.dialects.mysql.mysqldb fore more informations).
--

@deiferni please have a look.