K
K
kokapuk2020-11-13 21:00:35
Telegram
kokapuk, 2020-11-13 21:00:35

TelegramBotApi cannot send Cyrillic, what should I do?

The essence of the problem is that the bot can write Cyrillic, but only if I write it in the code itself, but when reading some txt or any other file containing Russian characters, the bot sends something like this:
чево

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
ddgryaz, 2020-11-13
@kokapuk

When you open any txt file, do you set the encoding?
For example like this:
open('kakoitofile.txt', 'w', encoding='utf-8')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question