Comments (14)
That error is directly from Telegram. It has got nothing to do with the library AFAIK.
Can you re-check with v1.0
with same keyboard and everything else?
from telegram-bot-sdk.
I have 3 bots!
@allStoreBot
@leitnerBot
@nowArzBot
@partnerLookBot
all bots work correctly except the first one!
I checked everything that i think may cause it! I have no idea now!
It's strange! because it works if you touch the same keyboard twice!
from telegram-bot-sdk.
Maybe try with another Telegram client? Like iOS/Desktop? It could also be a bug with their client.
from telegram-bot-sdk.
Error in devices:
Telegram Desktop mac OSX: yes
Telegram Desktop Windows: yes
Telegram android: yes
Telegram IOS: not yet!
from telegram-bot-sdk.
Ahan! Report this to Telegram Bot Support, So they can fix this issue across all their clients.
from telegram-bot-sdk.
OK, Thanks.
from telegram-bot-sdk.
I could find it!
filter text before sending it by:
$text = iconv("UTF-8", "UTF-8//IGNORE", $text),
There were some char not in utf-8 standard, so they made errors!
from telegram-bot-sdk.
Please give an example of what message failed BEFORE you filtered it through iconv()
.
Does this only apply to normal text messages?
Will it also fail if used as a caption for an image or a video?
Thank you.
from telegram-bot-sdk.
I don't think you've got the right solution to your problem.
The docs state:
If you append the string //TRANSLIT to out_charset transliteration is activated. This means that when a character can't be represented in the target charset, it can be approximated through one or several similarly looking characters. If you append the string //IGNORE, characters that cannot be represented in the target charset are silently discarded. Otherwise, E_NOTICE is generated and the function will return FALSE.
So in your case you are passing a string to the function that you want converted to UTF-8.
However you're telling the function that the input string is UTF-8 already but that it is to DROP any characters that are invalid.
Surely the message text you are trying to send is now missing characters?
from telegram-bot-sdk.
@jonnywilliamson
for normal text it works fine.
I had some info that filled by users and users used abnormal letters.
I prefer to delete abnormal letters rather that translate it.
from telegram-bot-sdk.
And have you tested if the same issue happens if you add those characters to image/video captions?
That would be another place that text might need to be filtered.
from telegram-bot-sdk.
no, I don't test in for caption of images! also I think videos don't have a caption!
and also I can't find that letters!
I scaned it myself and I can't detect abnormal letters!
but when I used `$text = iconv("UTF-8", "UTF-8//IGNORE", $text);`` everything be OK.
from telegram-bot-sdk.
from telegram-bot-sdk.
@jonnywilliamson
You right. 👍
from telegram-bot-sdk.
Related Issues (20)
- sendMediaGroup can't send video without sound HOT 1
- Sending double message after using setWebhook method HOT 1
- Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\Promise\unwrap() HOT 5
- Forbidden response HOT 1
- Command class "App\Telegram\Commands\StartCommand" should be an instance of "Telegram\Bot\Commands\CommandInterface" HOT 1
- setWebhook() and deleteWebhook() call returns undefined index for result array HOT 1
- Method [replyKeyboardMarkup] does not exist. HOT 3
- Command class "App\Services\Telegram\Commands\StartCommand" should be an instance of "Telegram\Bot\Commands\CommandInterface" HOT 1
- replyWithMessage with multiple bots not working HOT 1
- The Telegram::getWebhookUpdate() result always empty array [] HOT 3
- Get Channel Group Members HOT 6
- Bad Request: file must be non-empty
- Getting message list of a channel HOT 2
- "illuminate/support" 11 support HOT 1
- Wrong response from the webhook: 403 Forbidden HOT 2
- Unit Testing
- Is there a way to receive an event when a new member joins a channel? HOT 1
- Catch exception if user blocked the bot
- Make integration with birthday class
- Keyboard reply command handler not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-bot-sdk.