#4770 closed (fixed)
mysql_old and tables in utf8_unicode_ci -- non-ascii chars problems
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have a website in Dreamhost and with database engine 'mysql_old'... The non-ascii chars shows deformed, like this: Atenção! Inscrição, Seleção e Música de Câmara. But with 'mysql' in DATABASE_ENGINE the non-ascii chars works fine (I tested with a remotely connection).
[SVN INFO]
Revision: 5616
Last Changed Date: 2007-07-05 00:29:18 -0300 (Thu, 05 Jul 2007)
With unicode branch, the problem persists.
PS: I can't install new python-mysqldb in Dreamhost! :-/
Attachments (1)
Change History (6)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 17 years ago
The attached patch might be useful for somebody else wanting to hammer on this. It currently passes all tests with MySQLdb-1.2.2 (the second branch of the if-statement) and fails a bunch of tests with
ReferenceError: weakly-referenced object no longer exists
under MySQLdb-1.2.0.
Trying to set {[{conn.charset='utf8'}}} at the marked spot fails in the same way.
comment:3 by , 17 years ago
[5617] has a test in it that demonstrates this problem. Passes with all backends except mysql_old.
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Turns out there are two problems here: one with conversion on input and one with conversion on output. I didn't spot them originally because my database setup was using a sensible encoding. Configuring MySQL to use latin1 on the client side and an old MySQLdb(1.2.0) shows up the problem(s).
Fixing these is a little tricky. At the moment, I'm getting a weakref failure in the tests. I'll keep working on it in the background, but for the moment, you might not be able to use MySQL 100% reliably on Dreamhost. They really should install a non-broken MySQLdb.