domschrei / krunner-symbols

A lightweight KRunner plugin (Plasma 5) to retrieve unicode symbols, or any other string, based on a corresponding keyword.
GNU General Public License v3.0
117 stars 12 forks source link

unicode characters encoding issue? #11

Closed blizzz closed 6 years ago

blizzz commented 6 years ago

I am on a Arch-based distro, got symbols from AUR and enabled unicode. However, most characters are just show with the placeholder, also after copying:

screenshot_20180118_122837

domschrei commented 6 years ago

I had this issue on my installation as well, and I thought that it would just be some missing font packages. But now I actually did some research, looked into the incorrectly displayed symbols in the lookup table and figured that it concerned all symbols whose hexadecimal encoding has length 5 (the most common symbols all have length 4). I fixed the issue now by adding a special treatment for those symbols, explicitly decoding them into the usual unicode format.

So now it should work, at least it does for me: 👍. Thank you for the heads up! I wouldn't have looked into this if you didn't submit the issue.

EDIT: To clarify, I do still get some crossed out boxes when searching for some emojis, e.g. "dog face", but these are actually due to the font I am using for krunner: when pressing enter and pasting it in the browser, I get "🐶" (should display as dog face).

blizzz commented 6 years ago

@domschrei this fixes it, great! Pretty cool, thank you 🎆 🚀

I built it now from git, but perhaps it makes sense to do a new release at some point (e.g. for AUR users)? Some things went in since the last one. Just a suggestion.