GyverLibs / FastBot

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

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

Closed qlalfdu closed 1 year ago

qlalfdu commented 1 year 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 1 year ago

Incoming or outgoing?

qlalfdu commented 1 year ago

Incoming or outgoing?

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

GyverLibs commented 1 year ago

Markdown text mode is off? Try to

#define FB_NO_URLENCODE

Before #include fastbot

qlalfdu commented 1 year ago

The same goes for changing setTextMode

define FB_NO_URLENCODE

include

The result is broken.

GyverLibs commented 1 year ago

So i don't understand this line

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

qlalfdu commented 1 year ago

PN22-910

GyverLibs commented 1 year ago

So 1st and 2nd result is broken?

qlalfdu commented 1 year ago

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

GyverLibs commented 1 year ago

Seems like urlencode problem. I think i can fix it

GyverLibs commented 1 year ago

By the way, 가 is 3 byte char

GyverLibs commented 1 year 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