S
S
slavamironoff2020-12-22 16:08:41
Python
slavamironoff, 2020-12-22 16:08:41

What is the encoding problem?

Good afternoon.

When deploying the telegram bot to the server, I ran into one problem.
All files are encoded in utf8, but there is still a problem with Cyrillic.
When interacting with the bot, part of the Cyrillic alphabet is displayed normally, and part of the krakozyabry.
With what can be connected?5fe1efcb0a5ec383459912.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Pankov, 2020-12-22
@trapwalker

Answer.
This may be due to incorrect work with encodings.
Namely, the recoding takes place:
- in the wrong encoding
- out of the wrong encoding.
Usually, inexperienced programmers do not want to figure out how to work with encodings correctly and what Unicode is, and they solve all problems by typing by changing the code until the problem disappears. Because of this, they often have default conversions that break when changing the operating system, when starting in another way (from the terminal, on behalf of another user, via cron ...), when changing defaults (locale, terminal settings, database settings ).
Also, such inexperienced programmers are terribly afraid of error messages, but they don’t want to solve real problems and extinguish them in silent mode, which is why real problems are disguised as global silent empty error handlers. This leads to a complication of the internal behavior of the program, and here are the cases like yours.
When such programmers have problems (and they won’t), then these programmers do not describe the problem in detail, do not show the source code, do not outline the architecture of their system, but simply ask what the problem might be.
It is not difficult to give an exhaustive answer to such a question. There he is.

D
Denis Zagaevsky, 2017-02-07
@zagayevskiy

SQLite + StoreIO (human interface to SQLite). The database file itself should not be synced, sync data.
Or use Realm, everything is well thought out for synchronization.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question