Unicode encoded emoji must accept more than one byte. Therefore, byte by byte in this case will not help. If you redirect the output to a file, you can get almost the same file as your file.
You can try to print the string by changing the language (on Linux), or you can try wprintf on Windows (don't forget to convert to Wide string).
source share