Hi all,
I have a charset problem that is killing me.
Please keep in mind that I have no real experience with I18N, so I could be doing pretty stupid stuff or have a fundamental mis-understanding of things..
I need to save unicode data in my database and represent it in my forms, specifically, letters with accents.
I have nothing specified about the charset anywhere, I'm only using UnicodeCol in my model.
When using a sqlite db, this works nicely.
However, porting to a mysql db proved to be more troublesome. First sqlobject created tables with charsets different from the database default (could be mysql/sqlobject/python/os default). My database default is UTF-8 btw.
Then, after manually correcting the tables to UTF-8 and inserting some accent-char from a form, I get this:
File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/mysql/mysqlconnection.py
", line 60, in _executeRetry
return cursor.execute(query)
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 146, in execute
query = query.encode(charset)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 40: ordinal not in range(128)
What am I doing wrong?
All suggestions welcome...
TG version is 0.95a, mysql 5, Debian unstable.
--
Mvg,
Joris Vanhove
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---
- [TurboGears] Charset woes with Mysql Joris

