You can’t connect to a Wi-Fi directly if it’s SSID has any non-ASCII characters on Raspbian in GUI mode. For example, if your Wi-Fi’s SSID is 开源大法好1234, run the following command you will see this:

$ sudo iw wlan0 scan | grep 1234
     SSID: \xe5\xbc\x80\xe6\xba\x90\xe5\xa4\xa7\xe6\xb3\x95\xe5\xa5\xbd1234

Next, we can write this string to a file with Python3:

ssid = b'\xe5\xbc\x80\xe6\xba\x90\xe5\xa4\xa7\xe6\xb3\x95\xe5\xa5\xbd1234'
with open('ssid', 'wb') as file:
    file.write(ssid)

Then using xxd to convert it to hex dump:

$ xxd -p ssid
e5bc80e6ba90e5a4a7e6b395e5a5bd31323334 

Finally, copy this hex string to /etc/wpa_supplicant/wpa_supplicant.conf without the quotation mark.

Or

You can simply type the SSID to /boot/wpa_supplicant.conf inside the quotation marks, it works. I have tried this before but didn’t notice it failed because the SD card was dead.

Read more