-
Notifications
You must be signed in to change notification settings - Fork 24
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
Digits ('0', '1', etc.) are interpreted as emojis #280
Comments
Looks like there might be a bug when generating https://github.com/open-i18n/rust-unic/blob/master/unic/emoji/char/tables/emoji.rsv#L6 so that U+0030..U+0039 were mistakenly extracted out from the original UCD file (https://github.com/open-i18n/data-unicode-ucd/blob/master/data/EmojiSources.txt). I believe U+0030..U+0039 are only considered as emojis when they are followed by U+20E3. |
I believe the cause is that https://github.com/open-i18n/rust-unic/blob/master/gen/src/source/emoji/emoji_data.rs#L54 reuses the regex for parsing other binary properties ( |
This might also be the reason |
Unfortunately, they (along with |
Upon calling
unic::emoji::char::is_emoji('0')
, this library returnstrue
. I'm not aware of the specifics of the unicode standard, but I believe that'0'
is not an emoji.This test may be useful to introduce:
The text was updated successfully, but these errors were encountered: