irc: Add character encoding selection
patch 712de2f8a9af0ab75b8b3f05f7564e1987fe0453
Author: E. Bosch <presidev@AT@gmail.com>
Date: Fri Mar 18 20:57:45 CET 2022
* irc: Add character encoding selection
hunk ./irc.py 85
- message = message.decode().replace('\r','\n')
+ message = message.decode(self.conf['char_encoding'], errors='replace').replace('\r','\n')
hunk ./irc.py 150
- user.stream.write(command.encode())
+ user.stream.write(command.encode(self.conf['char_encoding'], errors='replace'))
hunk ./irgramd 72
+ tornado.options.define('char_encoding', default='utf-8', metavar='ENCODING', help='Character encoding for IRC')