The strings that invoke emojis in the Mac OS “Character Viewer”

Hello! You know the icon picker in Mac OS? They call it the “Character Viewer.” It’s the panel that lets you can type a word (such as “warning”) and all the icons and emojis that include that string, or that have a string that contains what you typed as a substring, appear as options.


For example, if you type “pea,” and you get 27 icons—V-hand, dove, peace sign, judges, peach, peanut, Chinese characters, and more.


How can we look behind the scenes to see the full list of strings associated with each icon? Where is that weird little file, and where is it stored?




MacBook Pro 16″, macOS 12.6

Posted on May 12, 2023 11:41 PM

Reply
Question marked as Top-ranking reply

Posted on May 13, 2023 07:25 AM

PlasmaticDragon wrote:

How can we look behind the scenes to see the full list of strings associated with each icon? Where is that weird little file, and where is it stored?

It's not a single file. There are two levels.


First is the basic Unicode level. These are the strings defined by the Unicode Consortium. This is an old-school computer committee, so everything is strictly English. It is a sqlite3 database located at:


/System/Library/Input Methods/CharacterPalette.app/Contents/Resources/CharacterDB.sqlite3


You will need to use the sqlite3 command-line database tool to read this file. It's a simple database. Use a query like this to find everything related to pizza:


select * from unihan_dict where info like "%pizza%";


If you try a few names, you'll notice that this data is incomplete. Not only are many characters missing, everything is in English.


Apple is much more inclusive. While the Unicode Consortium still defines the Unicode characters (please don't ask Apple for those), Apple draws and describes the characters. Apple describes those characters in many different languages. So if a character doesn't have an UPPERCASE ENGLISH name in the CharacterDB, you can look in your favourite language localization directory at:


/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/Resources


It looks like the Apple name for characters is in the "AppleName.strings" file, in whatever language localization you are looking at, such as "en.lproj" or "fr.lproj".


You can open this file using BBEdit. Technically it is a "properly list" text database so there are fancier tools you could use as well.

3 replies
Question marked as Top-ranking reply

May 13, 2023 07:25 AM in response to PlasmaticDragon

PlasmaticDragon wrote:

How can we look behind the scenes to see the full list of strings associated with each icon? Where is that weird little file, and where is it stored?

It's not a single file. There are two levels.


First is the basic Unicode level. These are the strings defined by the Unicode Consortium. This is an old-school computer committee, so everything is strictly English. It is a sqlite3 database located at:


/System/Library/Input Methods/CharacterPalette.app/Contents/Resources/CharacterDB.sqlite3


You will need to use the sqlite3 command-line database tool to read this file. It's a simple database. Use a query like this to find everything related to pizza:


select * from unihan_dict where info like "%pizza%";


If you try a few names, you'll notice that this data is incomplete. Not only are many characters missing, everything is in English.


Apple is much more inclusive. While the Unicode Consortium still defines the Unicode characters (please don't ask Apple for those), Apple draws and describes the characters. Apple describes those characters in many different languages. So if a character doesn't have an UPPERCASE ENGLISH name in the CharacterDB, you can look in your favourite language localization directory at:


/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/Resources


It looks like the Apple name for characters is in the "AppleName.strings" file, in whatever language localization you are looking at, such as "en.lproj" or "fr.lproj".


You can open this file using BBEdit. Technically it is a "properly list" text database so there are fancier tools you could use as well.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

The strings that invoke emojis in the Mac OS “Character Viewer”

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.