GyverLibs / FastBot

Многофункциональная быстрая библиотека для Телеграм бота на esp8266/esp32
MIT License
186 stars 31 forks source link

Broken at 2 byte character after 1 byte character(englash or number ) #23

Closed qlalfdu closed 2 years ago

qlalfdu commented 2 years ago

2byte + 2byte = OK ex: 가나

1byte + 2byte = OK ex: 1가, a가

2byte + englash or number = NG ex: 가1, 가a

2byte + sign character = OK ex: 가@

GyverLibs commented 2 years ago

Incoming or outgoing?

qlalfdu commented 2 years ago

Incoming or outgoing?

It happens when I send it to a bot from the desktop. (laptop > bot)

GyverLibs commented 2 years ago

Markdown text mode is off? Try to

#define FB_NO_URLENCODE

Before #include fastbot

qlalfdu commented 2 years ago

The same goes for changing setTextMode

define FB_NO_URLENCODE

include

The result is broken.

GyverLibs commented 2 years ago

So i don't understand this line

2byte + englash or number = NG ex: 가1, 가a

qlalfdu commented 2 years ago

PN22-910

GyverLibs commented 2 years ago

So 1st and 2nd result is broken?

qlalfdu commented 2 years ago

So 1st and 2nd result is broken? yes Breaks down when English or numbers come after Korean

GyverLibs commented 2 years ago

Seems like urlencode problem. I think i can fix it

GyverLibs commented 2 years ago

By the way, 가 is 3 byte char

GyverLibs commented 2 years ago

utils.cpp, line 54, add || c > 126 like this

else if (c <= 38 || c == '+' || c > 126) {

I will make an update soon and include this fix