Closed Nayar closed 4 years ago
It should work with the code you've given, but I didn't see utf8=True
in the RiveScript() constructor.
Python 3.7.6 (default, Jan 30 2020, 09:44:41)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> from rivescript import RiveScript
>>> bot = RiveScript(utf8=True)
>>> bot.unicode_punctuation = re.compile(r'[,!?;:]')
>>> bot.stream('+ my email is *\n- I got that as <star>')
>>> bot.sort_replies()
>>> bot.reply('kirsle', 'my email is name@domain.com')
'I got that as name@domain.com'
yep. works :)
However, when I call the function with an email: me@example.com, the function returns
meexamplecom
. UTF-8 has been enabled and works in other triggers