'ESP not connecting when WIFI_SSID has spaces

I'm trying to connect the ESP8266 to a certain WiFi, but the WiFi name has spaces:

#define WIFI_SSID "Super One Inn"

The board connects correctly when I use my phone as a hotspot:

#define WIFI_SSID "iPhone"

I can't change the WiFi's name, so I need to come up with a solution for those spaces.

I already tried "Super%20One%20Inn", "Super_One_Inn", "Super\One\Inn" Any suggestions?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source