Consider the following trigger
where we are using a character located in a higher plane (not the default Unicode plane), where there are two official encodings: one requiring a single Unicode-32 hexadecimal number (U+1F41F) or two smaller Unicode-16 hexadecimal numbers (0xD83D 0xDC1F). When I have the string,
and run the above trigger, I will get the result
that is, the replacement algorithm removed two characters (the fish and the g before) since it read the character as a two character Unicode, but it somehow is encoded in fact as a single character. Obviously, there is a simple workaround and that is not to use such characters.