Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with conversations with utf8 #78

Closed
arashsa opened this issue Feb 7, 2017 · 4 comments
Closed

Issue with conversations with utf8 #78

arashsa opened this issue Feb 7, 2017 · 4 comments

Comments

@arashsa
Copy link
Contributor

arashsa commented Feb 7, 2017

! var name = ælda

+ [*] yo [*]
- <bot name>

+ *
% <bot name>
- wow

This does not work. There seems to be an issue with utf8 and conversations.

@kirsle
Copy link
Member

kirsle commented Feb 7, 2017

This might be related to a similar issue in the JS implementation (aichaos/rivescript-js#147) which also involved optionals with Unicode symbols. The root cause identified there was with the word boundary sequence \b not working with non-ASCII symbols.

@arashsa
Copy link
Contributor Author

arashsa commented Feb 8, 2017

Is there a way to solve this? I'm not familiar enough with the code to figure out where the issue might be.

@kirsle
Copy link
Member

kirsle commented Feb 8, 2017

It will take some debugging and figuring out if I can fix the root cause of the issue (in the regular expressions).

On a near-term TODO list, I'll add a new command to RiveScript to allow for writing a raw regular expression in place of the trigger. I'm finding that Unicode is full of all kinds of little gotcha's, and regular expression engines aren't created equally between programming languages, so allowing for writing a raw regular expression might be the best way to work around these edge cases.

Example of what I mean:

// The new ~ command would allow for a raw regexp
// instead of using the + command
~ my name is (.+?)
- Nice to meet you, <star1>.

// that would be equivalent to...
+ my name is *
- Nice to meet you, <star1>.

@kirsle
Copy link
Member

kirsle commented Mar 10, 2017

Closing this issue in favor of tracking the ~Regexp feature in aichaos/rivescript-wd#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants