Disabling unicode does not work

Bug #499410 reported by Geert JM Vanderkelen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Connector/Python
Fix Released
High
Geert JM Vanderkelen

Bug Description

It is not possible to set 'use_unicode=False' when connecting. It is always True.

    db = mysql.connect(user='root',db='test',
        buffered=True,charset="latin7",use_unicode=False)
    print db.use_unicode

Outputs True

Consequently, the return values from non-unicode tables are values.

Tags: charset

Related branches

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) wrote :

revno: 171
committer: Geert Vanderkelen <email address hidden>
branch nick: myconnpy-CHARSET
timestamp: Wed 2009-12-23 09:52:48 +0100
message:
  Fixing unicode usage for both Python 2.4+ and 3.1

  * Setting 'use_unicode' at connection time is now working.
  * conversion.py: removing regular expression for quoting backslashes.
  * Adding test case for bug lp:499410

  Py3k specific:
  * Strings from MySQL are decoded to the given character when use_unicode
    is false
  * The statement is encoded just before sending it to the MySQL server.
    Internally, all is done in unicode.
  * In conversion.py: removing _unicode_to_mysql, adding _bytes_to_mysql
  * MySQLCursor.__unicode__ is obsolete and replaced with __str__
  * Removing tests for which the methods were deleted.

Changed in myconnpy:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.