Answer the question
In order to leave comments, you need to log in
How to transfer the Russian language to the chatbot keyboard?
Good afternoon, I started to deal with the keyboard for chat bots VK, here is my code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import json
def write_message(user_id, msg, keyboard=False):
if keyboard == False:
vk_session.method('messages.send', {'user_id': user_id, 'message': msg})
else:
vk_session.method('messages.send', {'user_id': user_id, 'message': msg, 'keyboard': str(json.dumps(keyboard))})
KEYBOARD_STEP_1 = {
'one_time': False,
'buttons':
}
write_message(user_id, message, KEYBOARD_STEP_1)
Answer the question
In order to leave comments, you need to log in
Hello Alex Mine !
Faced the same problem in PHP.
The solution turned out to be simple, I used the JSON_UNESCAPED_UNICODE parameter when encoded.
Try something similar in python.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question