yukuku / telebot

Telegram Bot starter kit. Very easy to install with Google App Engine.
Apache License 2.0
689 stars 236 forks source link

Supporting language question #46

Closed alkarba closed 8 years ago

alkarba commented 8 years ago

Thanks to the auther of this bot, it is seems as really a great opportuninty fo thouse who little dummy. I try to redisign telobot to make a @gamegurubot, which will be an outdoor game expert. The idea is quite simple, suppose we have a group of people having a free time, one of them may type to the bot something like: /play 5, outdoor, running. What will be recognized by bot as: group of 5 people, wonna spend their free time outside, playing something active like tag or freezbe. So bot will respond with a set of games best relevates with the request, choosing one, user will get the description and some media, or maybe map with the best nearest places to begin. i've collected games desctiptions mainly in russian, and for the first version i need bot to understand and responds in Russian. For begin i try to change basic answer for "what time" with something russian and it returns nothing, i added unicode supporting at a comment at the top of the main.py file and deploy again but the respond was still empty. Have you any guesses how to add a multilanguage suppurting, espessialy russian.

alkarba commented 8 years ago

got it! just need to add

import sys reload(sys) sys.setdefaultencoding('utf-8')

hurrray!