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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert utf8 or ascii emojis to iconify #81

Open
roeycohen opened this issue Aug 22, 2021 · 2 comments
Open

convert utf8 or ascii emojis to iconify #81

roeycohen opened this issue Aug 22, 2021 · 2 comments

Comments

@roeycohen
Copy link

hi!

is there any method to replace signs as :-) or :-o or UTF-8 characters such 馃悾 馃槑 to iconify?

something similar to this:
https://demos.joypixels.com/latest/jstoimage.html

10x!

@cyberalien
Copy link
Member

Not by default, but it probably can be done.

Icons are stored by keywords, so this would require mapping characters to keywords. List used by parser is available here: https://unicode.org/Public/emoji/13.1/emoji-test.txt

Then icons with matching names can be retrieved from API and rendered.

But that's just basic implementation. In reality things are more difficult because some emojis are combinations of other emojis. So script would also need to know all available emojis, split character that represents combination of emojis into multiple emojis if combined emoji is not available. That means in addition to characters map script need to retrieve full list of available icons.

It would be very inefficient and pointless to do in browser, but could be useful when parsing page on server, similar to MarkDown or BBCode parsers.

@roeycohen
Copy link
Author

10q @cyberalien,

In our use case, we just want to convert people's comments such in my first comment to nicer icons, so it's best for us to be in the client side.

I'll take on this link and see how can i work with :)

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

No branches or pull requests

2 participants