#normalizing channel names with unique fonts

15 messages · Page 1 of 1 (latest)

fair knot

im running into an issue where i have an autocomplete option for channel names from my database, but the channel names have unique fonts that make the autocomplete pretty much useless for focused values. is there a js method or package that can help me with this? i tried normalizing with ascii but i cant seem to figure it out

uncut narwhalBOT
echo halo

You mean the emojis? If so you should still be able to index the column to use with an auto-complete feature with your bot.
If you are storing the channel names as utf8_unicode_520_ci or utf8mb4_0900_ai_ci then you'll need to create a prefix index over that column (depending on the database used. I use mariaDB / mysql ) has there is a limit on how it builds indexes on very long character sets so your autocomplete might be breaking because of that.
CREATE INDEX idx_autocomplete_prefix ON your_table (channel_name(100));
Means create an index limiting it to the first 100 characters. This works well with LIKE '%foo' but has terrible performance when used with wildcards LIKE '%foo%'

fair knot
gusty zenith

Are you talking about Unicode characters? Because you can't change the font of channel names

fair knot

For example one of the channels is called 🔒|ᴀɴɢᴇʟ-ʟᴏᴄᴋs

but if i type in "angel" in the autocomplete it doesnt recognize that as the same as the channel

i just want a way to normalize the channel name in any way so i can match and display the channel names with different fonts

gusty zenith

"Latin Letter Small Capital G" is a different character than "G"

fair knot

that makes a lot more sense

any easy way that you know of to recognize those other characters as basic letters

gusty zenith