In my emoji picker when I enter freedom I see some french fries.

macOS character/emoji picker showing search for ‘freedom’ returning french fries emoji

Why is that?

Practical example:

So if I want to write something like the following:

People of the world appreciate what you're given, go out there and enjoy your freedom

So emojifying the above quote is somewhat dangerous:

👫👬 of the 🌎, appreciate what you're given, go out there and enjoy your 🍟.

  • 16
    I'd say that emojifying any proper text is somewhat dangerous – Hagen von Eitzen Nov 4 at 17:56
  • 1
    This makes me feel old... – Andrew Grimm Nov 5 at 23:14
up vote 93 down vote accepted

The 🍟 emoji is offered as an option for any search matching the string freedom fries, which

was a political euphemism for French fries in the United States. The term was born in 2003 when the then Republican Chairman of the Committee on House Administration, Bob Ney, renamed the menu item in three Congressional cafeterias in response to France's opposition to the proposed invasion of Iraq.

In the character picker, any prefix substring match on a word relating to that emoji will present the emoji for selection. Therefore ‘free’ or ‘freedom’ will match ‘freedom fries’.

Where does the OS find these strings?

CoreEmoji.framework contains a list of emojis and relevant search strings, per locale, in

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

replacing en with the locale. For the strings used by the character picker when searching, look in CharacterPicker.strings. For example:

/System/L*/Priv*/CoreE*/V*/A/R*/en.*/C*

Open the .strings file as a .plist in Xcode to prettyprint it as shown above, or use plutil:

$ plutil -extract "🍟" xml1 -o - /System/L*/Priv*/CoreE*/V*/A/R*/en.*/C*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>fries | freedom fries | french fries | fast food | junk food | food | object</string>
</plist>
$ plutil -convert json -o - /System/L*/Priv*/CoreE*/V*/A/R*/en.*/C* | jq -r ".[\"🍟\"]"
fries | freedom fries | french fries | fast food | junk food | food | object

I don't want QuickType to suggest 🍟 as an autocomplete to ‘freedom’!

It won't. QuickType autocomplete emoji suggestions, or Messages tap-to-replace words with emojis when the emoji keyboard is shown, is defined by another file, FindReplace.strings.

Emojis are suggested as word replacements when an entire word in the original text matches an entire word in a string relating to the emoji. The word ‘freedom’ will not be replaced by the emoji since the ‘freedom fries’ phrase only exists in CharacterPicker.strings, not FindReplace.strings.

$ plutil -convert json -o - /System/L*/Priv*/CoreE*/V*/A/R*/en.*/F* | jq -r ".[\"🍟\"]"
fries | french fries | french fry

‘fries’ showing fries emoji ‘freedom’ not showing fries emoji

  • Comments are not for extended discussion; this conversation has been moved to chat. – nohillside Nov 2 at 16:50
  • You can also view them in human-readable format with QuickLook, use the Mac plutil command to convert them to json for quick viewing outside Xcode – JeffThompson Nov 3 at 11:17
  • 1
    @Jeff Indeed, I've added a couple of plutil examples but feel free to expand with other ways to get useful information from the strings file. – grg Nov 3 at 12:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.