Build failing - Arduino ESP32 Project

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? :confused: 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

It was a frustrating one as I couldnt tell where it was coming from, and there was no way of knowing other than to just one by one remove files.

My PR at Remove smart quotes in #warning by maxgerhardt · Pull Request #12 · wizard97/ArduinoRingBuffer · GitHub was accepted btw, as a hotfix in this very specific library.

@maxgerhardt You’re a good man charlie brown!