Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle emojis in the username #3

Open
levnikmyskin opened this issue Mar 24, 2019 · 0 comments
Open

Handle emojis in the username #3

levnikmyskin opened this issue Mar 24, 2019 · 0 comments

Comments

@levnikmyskin
Copy link
Owner

Currently it's not possible to store username containing emojis in the database. This is due to telegram sending emojis in a utf16 with surrogates encoding (by the way, if you paste an emoji such as \ud83e\udd13 on PyCharm console, it looks like it's going to screw it all up and needs to be restarted).
In python, one could decode it with: s.encode('utf16', 'surrogatepass').decode('utf16')
However the mysqlclient library then crashes. I don't see any solution for this at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant