Skip to content

Handle emojis in the username #3

@levnikmyskin

Description

@levnikmyskin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions