I will escalate Mysql and unicode problem one more time since I'm
fed-up with it :-) I have analysed sqlobject and python-mysql code and
have found two bugs that are critical in turbogears situation. What I
ask you is to look at them and confirm. Please, show to the sqlobject
and mysql-python authors that we do care about this problem and that we
like what they do.
sourceforge.net works rather slow but you could check following bugs:
[ sqlobject-Bugs-1547743 ] sqlobject-0.7.1dev_r1884, Mysql and unicode
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1547743&group_id=74338
This one is new to me but maybe other from you met it and can confirm
it.
What I must note that in order to use sqlobject properly with utf-8 you
must set both charset and sqlobject_encoding.
sqlobject.dburi="mysql://...?charset=utf8&sqlobject_encoding=utf-8"
And other bug in python-mysql. I believe it affects windows only but
can't confirm it at the moment.
[ mysql-python-Bugs-1547736 ] utf-8 and windows
https://sourceforge.net/tracker/?func=detail&atid=374932&aid=1547736&group_id=22307
Best regards,
Dalius Dobravolskas
A little bit more time and I have found how to solve MySql and UTF-8
problems without encode(), setdefaultencoding() and other
hacks/workarounds. Those instructions applies to TurboGears version
from SVN:
1. You must fix SQLObject by hand. Check
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1547743&group_id=74338
for more information. I hope this bug will be fixed soon.
2. This one is not relevant to FreeBSD.
a) If you are working on windows you will need to rebuild python-mysql
as well because it is build against pretty old MySQL version. While you
expect MySQL 5.0 at least. How to build python-mysql you can read at
https://sourceforge.net/tracker/?func=detail&atid=374932&aid=1548032&group_id=22307.
Again, I hope this and
https://sourceforge.net/tracker/?func=detail&atid=374932&aid=1547736&group_id=22307
will be fixed soon because Andy
(https://sourceforge.net/users/adustman/) is already look at those
problems.
b) If you are working on Ubuntu install python-mysql manually. Do you
need instructions? I hope Ubuntu will add most recent package of
python-mysql sooner or later. Mark Shuttleworth is python lover after
all :)
After all that's why I love open-source. I can solve my problems
myself. I hope you will find this information helpful.
Best regards,
Dalius
Enjoy :)
SqlObject problem is not solved yet though.