Apostrophe in SSID -> "No closing quotation" error during compilation

Hey,

I’ve started with the MATRIX voice today, and wanted to compile it. In order to get a WIFI connection with the ESP32 version, you have to set a string in the “build-flags” with an SSID and a PW.
https://github.com/matrix-io/esp32-platformio/blob/fca1a39fce79c20edfa8112749b1b51665d55352/platformio.ini

I know, it IS kind of difficult, but it is, as it is: my WIFI SSID includes an '. So, when I enter “My Wifi’s SSID”, it is directly shown in VSCode, that the string “build-flags” will be “broken”. But if I escape ' the apostrophe, it still breaks the compilation. https://pastebin.com/pzjJTjEC

I guess, in later steps of the build the ’ isn’t escaped any longer and therefore creates errors. Any idea, what I can do about that? (Change my SSID is not really an option, as this would mean to reconnect a LOT of devices… :frowning: )

Kind regards
Julian

Have you tried it per documentation?

build_flags = 
   -DWIFI_SSID=\"My\ Wifi\'s\ SSID\"

If I omit the ’ at the beginning and the end of the “flags” lines the main.cpp of the matrix code throws errors like

src\main.cpp:21:1: error: missing terminating ' character

and with the ’ the problem stays the same: “No closing quotation”.

Adapt the others the same way.

build_flags =
   -DWIFI_SSID=\"My\ Wifi\'s\ SSID\"       ; ==> CHANGE IT!
   -DWIFI_PASS=\"PASSWORD_GOES_HERE\"   ; ==> CHANGE IT!
   -DMVID=\"MVESP\"                     ; MV LAN name, max 8 chars
   -DMVPASS=\"voice\"                   ; MatrixVoice OTA password

builds fine for me.

Thanks alot!
I think it was a bit too late for me this night! You’re right, it builds perfectly. Now, I’ll try to flash an see, if it connects to my WIFI! :slight_smile:

Thanks again!