#18392: Use utf8mb4 encoding with MySQL 5.5 -------------------------------------+------------------------------------- Reporter: EmilStenstrom | Owner: nobody Type: Uncategorized | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Design Keywords: hack utf8mb4 mysql | decision needed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by rogeliorv):
* keywords: => hack utf8mb4 mysql Comment: As proof of concept I tried inserting into mysql the following values in a varchar. πππβΊππππ And got a "Warning: Incorrect string value" from mysql (which python treats as an exception) As a way to test it. The hack consists in adding self.query('SET NAMES utf8mb4') in MySQLdb.connections in Connection.set_character_set function as shown here: http://pastebin.com/MW5BgRgP Of course the correct way would be to change this in django when setting up the cursor connection. -- Ticket URL: <https://code.djangoproject.com/ticket/18392#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.