@strafer This may seem very counterintuitive, but emoji are actually text.
Well, that’s an oversimplification. What I mean is that they’re Unicode codepoints. Which is basically text.
Basically, what this means is that emoji are actually encoded and handled in the same way that say, a Japanese character would be.
For instance:
あいうえお
(a i u e o, the 5 vowels written in Japanese hiragana script)
- In UTF-8 representation, the above would be
\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a
.
- In UTF-16 representation, the above would be
\u3042\u3044\u3046\u3048\u304a
.
aiueo
(same thing as above, but now with Latin characters)
- In UTF-8 representation, the above would be
\x61\x69\x75\x65\x6f
.
- In UTF-16 representation, the above would be
\u0061\u0069\u0075\u0065\u006f
.
🍍🌺🎋🍕🌭
- In UTF-8 representation, the above would be
\xf0\x9f\x8d\x8d\xf0\x9f\x8c\xba\xf0\x9f\x8e\x8b\xf0\x9f\x8d\x95\xf0\x9f\x8c\xad
.
- In UTF-16 representation, the above would be
\ud83c\udf4d\ud83c\udf3a\ud83c\udf8b\ud83c\udf55\ud83c\udf2d
.
Basically every modern (or modern-ish) filesystem in use today — APFS, HFSJ+, ext4/ext3/ext2, ZFS, NTFS, exFAT, and even FAT32/FAT16/FAT12 (thanks to Microsoft’s backwards-compatible “Long Filename” feature) supports storing and retrieving unicode characters as filenames or directory names.
Generally speaking, the only issues you’d potentially run into are if you tried to view these filenames using an operating system that doesn’t correctly supports Unicode, such as early versions of Windows XP.
But even then, you’d still be able to access the files. The folder name would simply be displayed incorrectly, as mojibake. (tl;dr: A Japanese word that ended up in the English lexicon, used to describe what happens when a non-Unicode aware OS attempts to render Unicode text with the wrong encoding.)
When dealing with actual data access or I/O in filesystems, computers really only care about the raw UTF-8/UTF-16 representations I showed above. Actually displaying said Unicode data to the end user is a completely separate thing. As a result, data loss due to Unicode filenames doesn’t happen. (If it did, a large portion of the world would be screwed…)
As for how your emoji will render/display on each OS… that’s just up to each individual OS’s emoji support. If your OS doesn’t support rendering a specific emoji, you may see a � replace it instead.
Hopefully this makes sense to you.
tl;dr: Emoji are text. Naming something with emoji is just like naming it in Japanese or another foreign language script. As for how it’ll be displayed, it’ll probably be correct as long as you’re using a reasonably modern OS. Really just depends on the emoji support in general on said OS. Data loss shouldn’t really happen — all modern filesystems support Unicode. Also, the rest of the non-English-speaking world use computers too ;P
※ Fun fact: There are actually literal Egyptian hieroglyphs in Unicode, as well.