#23 utf8mb4 Patch - 4 Byte Unicode Support

MySQLdb-1.3
open
MySQLdb (19)
5
2013-07-31
2012-03-18
emlazzarin
No

Although MySQLdb 1.2.3 does have UTF8 support, MySQL did not support 4-byte characters until MySQL 5.5, with the introduction of the "utf8mb4" character type. However, MySQLdb does not support the "utf8mb4" charset. This means that Unicode strings that are perfectly valid in Python, should they contain 4-byte characters, cannot be sent to a MySQL database.

I created my own patch (a few lines in connections.py and cursors.py that I'd be happy to share with anyone if they feel it would help), but this would helpful in th elong term - and really is required in a MySQLdb 1.3.

Thank you.

Discussion

  • emlazzarin

    emlazzarin - 2012-03-18

    Let me know if I should move this to "bugs", as some may see it that way.

     
  • Volka Racho

    Volka Racho - 2013-07-31

    Would be great if you could share your code for connections.py and cursors.py I am constantly gettting OperationalError: 1366 and Incorrect string values because of no UTF8mb4 support

     

Log in to post a comment.