With
#warning "Emojis are weird: 😃"
in the code, the warning
src\main.cpp:4:2: warning: #warning "Emojis are weird: 😃" [-Wcpp]
#warning "Emojis are weird: 😃"
^
is emited, which is also corrupted (but doesn’t crash the thread).
I guess it’s a kinda difficult task to predict the correct text encoding outputted by GCC when custom user strings are involved? If it’s impossible, maybe there should just be a try-catch + ignore for these cases.
Maybe Windows has its play in it, too: The terminal is powershell with encoding set to CP1252.
EDIT: Arabic chars which contain 0x9d
in the sequence crash, too:
#warning "Arabic test: ڝ"
Related? unicode - Python 3 UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d - Stack Overflow