pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encoding trouble.

wipedlifepotato opened this issue · comments

Encoding in your library.
I send in cyrrilic text from my bot.
Username, [03.01.2023 20:26]
PRIVET MIR BLIN??

ТРАНСЛИТ ВАПЩЕ, [03.01.2023 20:26]
привет мир блин??

I did set System.setProperty("file.encoding","UTF-8"); even. is not works.
Is example of URLEncoded string from debug -> INFO: {"ok":true,"result":{"message_id":75,"from":{"id":5823087468,"is_bot":true,"first_name":"\u0422\u0420\u0410\u041d\u0421\u041b\u0418\u0422 \u0412\u0410\u041f\u0429\u0415","username":"TRANSLITPROSTAVAPSEBOT"},"chat":{"id":5880613453,"first_name":"Username","type":"private"},"date":1672766790,"text":"\u0420\u0457\u0421\u0402\u0420\u0451\u0420\u0406\u0420\u00b5\u0421\u201a \u0420\u0458\u0420\u0451\u0421\u0402 \u0420\u00b1\u0420\u00bb\u0420\u0451\u0420\u0405??"}}
INFO: chat_id=5880613453&text=%D0%A0%D1%97%D0%A1%D0%82%D0%A0%D1%91%D0%A0%D0%86%D0%A0%C2%B5%D0%A1%E2%80%9A%20%D0%A0%D1%98%D0%A0%D1%91%D0%A1%D0%82%20%D0%A0%C2%B1%D0%A0%C2%BB%D0%A0%D1%91%D0%A0%D0%85%3F%3F&parse_mode=HTML&disable_web_page_preview=true&disable_notification=true

If i use https://www.online-decoder.com/ru its fixed. like is use uncorrect encoding.
https://www.urldecoder.org/ show that is broken.
DFile and another things yet not helps.