If I add a smiley like https://www.fileformat.info/info/unicode/char/1f601/index.htm to a SuperTextMesh, I get the following
Error: UTF-16 to UTF-8 conversion failed because the input string is invalid UnityEngine.StackTraceUtility:ExtractStackTrace () SuperTextMesh:FigureOutUnwrappedLimits (UnityEngine.Vector3) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:2951) SuperTextMesh:RebuildTextInfo () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:3239) SuperTextMesh:Rebuild (single,bool,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1572) SuperTextMesh:Rebuild (single,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1521) SuperTextMesh:Rebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1511) SuperTextMesh:set_text (string) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:774) EmojiTest:<Start>b__2_0 () (at Assets/EmojiTest.cs:10) UnityEngine.EventSystems.EventSystem:Update ()
and
Error: UTF-16 to UTF-8 conversion failed because the input string is invalid UnityEngine.StackTraceUtility:ExtractStackTrace () SuperTextMesh:RebuildTextInfo () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:3289) SuperTextMesh:Rebuild (single,bool,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1572) SuperTextMesh:Rebuild (single,bool) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1521) SuperTextMesh:Rebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1511) SuperTextMesh:set_text (string) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:774) EmojiTest:<Start>b__2_0 () (at Assets/EmojiTest.cs:10) UnityEngine.EventSystems.EventSystem:Update ()
If I do the same in an IL2CPP build, it segfaults in some C++ code that tries to convert utf16 to utf8.
This is especially problematic when the text is user-defined.