G
G
Guerro692021-02-06 17:18:23
Python
Guerro69, 2021-02-06 17:18:23

How to convert emoji to html code?

I have a simple bot that logs each message and writes it to a ".txt" notepad, but when a person sends an emoji, then there is an encoding problem.

'charmap' codec can't encode character '\U0001f479' in position 143: character maps to <undefined>

I thought, why not write these emoji in notepad as html code("& #xxx;"), which vk successfully converts, but I have no idea how this can be implemented.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antosha Styazhkin, 2021-02-06
@Guerro69

What about this decision?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question