-
Notifications
You must be signed in to change notification settings - Fork 92
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
Unicode support #71
Comments
No, you will have to look into some other crate for that. You can then use |
For classes only, yes. For normalisation, no, one would have to write a new parser using the unicode-normalization crate, because a In fact I tried—and failed (#85)—at similar thing with graphemes and unicode-segmentation yesterday. And then it depends on how generic you'd need the parser to be. |
To get regex parsers working I added FullRangeStream which lets one get retrieve a view into the entire parsers input. pub fn grapheme<'a, I>(input: I) -> ParseResult<&'a str, I>
where I: FullRangeStream<Range = &'a str>
{
let mut iter = input.range().graphemes();
match iter.next() {
Some(g) => {
let len = input.range().len() - iter.as_str().len();
take(len).parse_stream(input)
}
None => Err(ParseError::end_of_input()),
}
} |
Does your crate support Unicode character classes and normalization?
The text was updated successfully, but these errors were encountered: