Some folks including myself have gotten frustrated when trying to do a headless set-up of their PI by inserting the blank SSH file and the wpa_supplicant.conf file into the boot folder. For example see: viewtopic.php?t=230604 After a lot of trial and error, this user finally got his Pi to connect to his router after cutting and pasting the appropriate text into his .conf file. Prior to this attempt, he was manually typing the text in. So what was really happening?
I found a possible answer on a 2013 posting on the RPi Stack Exchange. The poster stated that the text must be in Linux/Unix format. This means no CR LF at the end of text lines. Linux requires LF only. Cutting and pasting text straight from the RPi documentation (see link below) may avoid inserting the CR at the end of lines. Alternatively, you can use a text editor like Notepad++ which allows you to specify the Unix LF format.
Since most new Pi users are not Linux experts, I think it would be helpful to mention this format requirement if it is valid in the PI documentation for the headless set-up right here: https://www.raspberrypi.org/documentati ... eadless.md If this isn't valid, the best practice may be to simply cut and paste the text and carefully type in the required information.