Setting character set at connection fails
Bug #499362 reported by
Geert JM Vanderkelen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
Fix Released
|
High
|
Geert JM Vanderkelen |
Bug Description
The charset connection option is ignored
db = mysql.connect(
cur = db.cursor()
cur.
print_
outputs
(u'character_
(u'character_
(u'character_
(u'character_
(u'character_
(u'character_
(u'character_
(u'character_
Should not use SET NAMES when connecting.
Related branches
Changed in myconnpy: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
revno: 170
committer: Geert Vanderkelen <email address hidden>
branch nick: myconnpy-CHARSET
timestamp: Tue 2009-12-22 09:37:10 +0100
message:
Fix setting character set at connection
* mysql.connector .Connect( charset= 'latin1' ) now works as expected charset( charsetname) to change.
* Default character set is (still) UTF-8.
* SET NAMES is only used when changing character set after connecting.
Use MySQL.set_
* Test case added for bug report; fixing test case in test_protocol.py
to reflect the new default character set 'utf-8'.