
June 16, 2008
7:21 a.m.
There may be an issue with your MemberAdaptor. With OldStyleMemberships.py, accented characters are accepted and stored as themselves in the usernames dictionary.
Yes you are correct Mark, this escaping is done by MysqlMemberships.py
def escape(self, value):
# transforms accents into html entities (é)
# TODO: find out which language is current (here: uses iso-8859-1)
value = Utils.uncanonstr(value)
# addslashes before " and '
return MySQLdb.escape_string(value)
the difficulty is that MySQLdb.escape_string crashes if given non-ascii text.
So I'm modifying MysqlMemberships.py (rev. 94) so that we canonstr() back in getMemberName(). However it's a not ideal; I don't like that idea very much as it means that inside the db it is stored as è. Should probably be utf-8.
-- Fil