aichaos / rivescript-js

A RiveScript interpreter for JavaScript. RiveScript is a scripting language for chatterbots.
https://www.rivescript.com/
MIT License
377 stars 144 forks source link

Keyword trigger not matching '[*] sí [*]' #336

Closed stephenkellyit closed 4 years ago

stephenkellyit commented 4 years ago

When using a keyword trigger with utf-8 mode enabled, like so: + [*] sí [*]

The trigger does not match when the user sends , but does if they send along with other words such as sí with other words.

So it looks like when a special character is the last character in a message the trigger does not match.

kirsle commented 4 years ago

Hi, this is a known issue in the JS version of RiveScript and there's a special command added to solve this particular use case of "keyword trigger containing Unicode"

Use this instead:

? sí
- Response here as normal.

See #147 for more backstory.