#213 Bug when using several different charsets

MySQLdb-1.2
closed
MySQLdb (285)
5
2012-09-19
2006-09-29
No

When using several connections with different charsets
(for example, UTF-8 and Latin-1), the converter dict is
not built correctly. It copies the dict, but not the
lists in the dict. Thus the .insert's further down in
the function init of connections.py insert into the
same list in all instances of the class, because it's
only referenced. The list then contains the almost same
converter function multiple times, but with different
charsets. The attached patch changes the code to copy
lists in the converter dict.

This happens with the latest release, 1.2.1, and is not
yet fixed in SVN. Running on FreeBSD, but this error is
not distribution specific.

Discussion

  • Michael Hanselmann

    Patch for charset bug

     
    Attachments
  • Andraz Tori

    Andraz Tori - 2006-12-10

    Logged In: YES
    user_id=20871
    Originator: NO

    Please commit this. It is total PITA when for example you are using django for web frontend and also need to reach into some other database manually.

     
  • Andy Dustman

    Andy Dustman - 2007-02-10

    Logged In: YES
    user_id=71372
    Originator: NO

    A variant has been applied in r466; will be in 1.2.2b3

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks