- The message that told the user how to view a single definition did
not account for unicode characters and assumed an ascii encoding.
The expr variable in the format argument is now wrapped in a unicode
function that specifies utf-8 as its encoding.
Committer: Brewster <redacted>
On branch bug-internets-
201901052016-brewster
Changes to be committed:
modified: pyva/pyva/src/main/python/internets/cmd_user.py
else:
for num, entry in enumerate(res['list'], 1):
if num == 4:
- self.notice(sender, u'To view a single definition with a related example, type: @b.u %s /def_number@b. For more definitions, visit: %s' % (expr, res['list'][0]['permalink']))
+ self.notice(sender, u'To view a single definition with a related example, type: @b.u %s /def_number@b. For more definitions, visit: %s' % (unicode(expr, 'utf-8'), res['list'][0]['permalink']))
break
definition = entry['definition'].replace('\r\n', ' / ').replace('\n', ' / ')