uranusjr commented on issue #15355: URL: https://github.com/apache/airflow/issues/15355#issuecomment-819518745
Thanks! That makes sense, you shouldn’t get back raw bytes on Python 3. [According to the documentation](https://github.com/PyMySQL/mysqlclient/blob/master/doc/user_guide.rst#functions-and-attributes), `{"use_unicode": true}` is actually implied when you provide `charset`: > ***charset*** > If present, the connection character set will be changed to this character set, if they are not equal. Support for changing the character set requires MySQL-4.1 and later server; if the server is too old, UnsupportedError will be raised. This option implies use_unicode=True, but you can override this with use_unicode=False, though you probably shouldn't. So the code block you mentioned above actually has no effect at all, and is probably a history relic. I’m guessing MySQL is actually returning the correct result for you (in `utf8mb4` mode; `utf8` can’t handle emojis), it’s just your terminal is not capable of rendering it (a very common issue on Python 2). So maybe you can try do something with the returned data anyway (e.g. write them into a file)? That should actually produce correct output (i.e. there is no bug!), if I’m not mistaken. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
