Support non-ASCII characters in EuiSearchBar & Query#1415
Conversation
bmcconaghy
left a comment
There was a problem hiding this comment.
This does not address the use case from the original report. I linked in your changes and tried it out and got the same error. 汽车 is my test.
|
@bmcconaghy did you Your example query works fine in the EUI docs' Search Bar page with these changes |
jasonrhodes
left a comment
There was a problem hiding this comment.
The unicode changes look sane to me.
bmcconaghy
left a comment
There was a problem hiding this comment.
LGTM now that I have these changes actually running in my Kibana :-)
Yeah, that is the goal :) |



Summary
Fixes #1409 by adding support for non-western/latin/ASCII characters & punctuation within term & field values. This casts a wide net, allowing any and all UTF-16 characters in the range
U+00C0-U+FFFF(begins in Latin-1 Supplement). It's highly unlikely we would want to use any character in that range for another purpose in queries.Implementation
I added the
U+00C0-U+FFFFrange as a supported value within the grammar'swordCharentry. PEG.js doesn't understand regex character classes so this abuses the fact that character ranges only care about byte code values. The exact characters forU+00C0andU+FFFFare injected into the grammar's source instead of their unicode escape sequences.Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] Documentation examples were added- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components