opened
JohnMaguire
username_0
```
14:14:01          infy | .weather Москва
14:14:01      Cardinal | [ Moscow,  Moscow Federal City, Russia | Scattered Showers | Temp: 38 F (3 C) | Humidity: 93% | Winds: 22 mph ]
14:17:48          infy | .wiki A
14:17:49      Cardinal | [ Wikipedia: A | A (named /ˈeɪ/, plural As, A's, as, a's or aes[nb 1]) is the first letter and the first vowel in the ISO basic Latin alphabet.[1] It is similar to the... | https://en.wikipedia.org/wiki/A ]
14:17:54          infy | .wiki Папирология
14:18:02          infy | whoami: doesn't work with utf8?
14:18:11          infy | urlencoding issues maybe?
```

Bot logs:
```
2017-02-24 14:17:48,641 - cardinal.bot - DEBUG - infy!~infy@reid-kftkol.cybershade.org to #bots: .wiki A
2017-02-24 14:17:48,641 - cardinal.plugins - DEBUG - Attempting to fire event: irc.privmsg
2017-02-24 14:17:48,642 - cardinal.plugins - DEBUG - Calling 0 callbacks for event: irc.privmsg
2017-02-24 14:17:49,222 - cardinal.bot - INFO - Sending in #bots: [ Wikipedia: A | A (named /ˈeɪ/, plural As, A's, as, a's or aes[nb 1]) is the first letter and the first vowel in the ISO basic Latin alphabet.[1] It is similar to the... | https://en.wikipedia.org/wiki/A ]
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 884, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcb in position 93: ordinal not in range(128)
Logged from file bot.py, line 437
2017-02-24 14:17:49,242 - cardinal.plugins - DEBUG - Attempting to fire event: irc.raw
2017-02-24 14:17:49,243 - cardinal.plugins - DEBUG - Calling 0 callbacks for event: irc.raw
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 884, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 60: ordinal not in range(128)
Logged from file bot.py, line 149
2017-02-24 14:17:54,968 - cardinal.plugins - DEBUG - Attempting to fire event: irc.raw
2017-02-24 14:17:54,968 - cardinal.plugins - DEBUG - Calling 0 callbacks for event: irc.raw
2017-02-24 14:17:54,969 - cardinal.bot - DEBUG - infy!~infy@reid-kftkol.cybershade.org to #bots: .wiki Папирология
2017-02-24 14:17:54,969 - cardinal.plugins - DEBUG - Attempting to fire event: irc.privmsg
2017-02-24 14:17:54,969 - cardinal.plugins - DEBUG - Calling 0 callbacks for event: irc.privmsg
Unhandled Error
Traceback (most recent call last):
  File "/home/john/.virtualenvs/Cardinal-DH/local/lib/python2.7/site-packages/twisted/words/protocols/irc.py", line 2430, in dataReceived
    basic.LineReceiver.dataReceived(self, data.replace('\r', ''))
  File "/home/john/.virtualenvs/Cardinal-DH/local/lib/python2.7/site-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "/home/john/files/Cardinal-DH/cardinal/bot.py", line 159, in lineReceived
    super(CardinalBot, self).lineReceived(line)
  File "/home/john/.virtualenvs/Cardinal-DH/local/lib/python2.7/site-packages/twisted/words/protocols/irc.py", line 2438, in lineReceived
    self.handleCommand(command, prefix, params)
--- <exception caught here> ---
  File "/home/john/.virtualenvs/Cardinal-DH/local/lib/python2.7/site-packages/twisted/words/protocols/irc.py", line 2482, in handleCommand
    method(prefix, params)
  File "/home/john/files/Cardinal-DH/cardinal/bot.py", line 186, in irc_PRIVMSG
    self.plugin_manager.call_command(user, channel, message)
  File "/home/john/files/Cardinal-DH/cardinal/plugins.py", line 753, in call_command
    command(self.cardinal, user, channel, message)
  File "/home/john/files/Cardinal-DH/plugins/wikipedia/plugin.py", line 86, in lookup_article
    article_info = self._get_article_info(name)
  File "/home/john/files/Cardinal-DH/plugins/wikipedia/plugin.py", line 40, in _get_article_info
    url = "https://%s.wikipedia.org/wiki/%s" % (self._language_code, name)
exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
2017-02-24 14:18:02,530 - cardinal.plugins - DEBUG - Attempting to fire event: irc.raw
2017-02-24 14:18:02,532 - cardinal.plugins - DEBUG - Calling 0 callbacks for event: irc.raw
2017-02-24 14:18:02,535 - cardinal.bot - DEBUG - infy!~infy@reid-kftkol.cybershade.org to #bots: whoami: doesn't work with utf8?

```
Wiki plugin can't handle UTF-8 characters
issue
created
mvineetmenon
username_1
Do you mind if I PR'ed this one?
comment
created
JohnMaguire
username_0
I'm always happy with pull requests. Be sure to add your name to the CONTRIBUTORS file as well if you wish. :)
comment
created
JohnMaguire
username_0
I think this looks pretty good, but I need to test it before merging. 👍 

In the meantime, do you think you can [squash these commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) down into a single commit?

Thanks!
comment
created
mvineetmenon
username_1
@username_0, I squashed the commits successfully, but I'm unable to push to remote.
Would an ff help?
comment
closed
JohnMaguire
username_0
issue