Wifi Question: Accented Character Handling

Here’s one that has been bothering me for a while. I just upgraded to 7.1 SD card version and found it’s still an issue. The issue: How do I configure PiAware to use a WiFi network when the network name contains accented characters. An example network name is “Chômage” and simply stated I can’t find the magic to enter it into piaware-config.txt so it works. It looks correct when using nano over ssh but dies somewhere in the middle.

Easiest way: Change the WiFi network name to one without accented characters.

The SSID ends up in wpa_supplicant.conf which is IIRC effectively 7-bit

Here’s some suggestions for how to represent a SSID with non-7-bit characters in a form that wpa_supplicant understands: wifi - Specifying wireless network name with accent in wpa_supplicant.conf? - Raspberry Pi Stack Exchange

(My understanding is that SSIDs with accented characters are problematic because there’s no universal standard for what the encoding is; some things assume UTF-8, other things assume ISO-8859-1 or another encoding)

My experience has been the best approach is to use:

sudo iwlist wlan0 scan | grep SSID

to scan all the access points and see what the pi reports as the SSID. Then use that exact text between double quotes in the wpa_supplicant.conf file. I found that there was inadvertent whitespace at the end of my SSID that I had not picked up.

Another example: There is an access point near me that shows up on my iPhone as ‘Böcker’ with the ö character.

And the rpi scan shows

SSID:"B\xC3\xB6ker"

There is a good table here of the right escape codes.
https://www.utf8-chartable.de/unicode-utf8-table.pl?start=128&number=128&names=-&utf8=string-literal

where we find that the UTF8 for ö is indeed
U+00F6 ö \xc3\xb6

My experience is that the Raspberry devices do not like having special characters in SSID names and also not in passwords

All that is helpful in further troubleshooting the issue. Let me ask the question differently.

I am running the SD card version of PiAware (version 7.1). Short of manually coding the ssid as a hex string in wpa-supplicant.conf, is there a way to enter the ssid into piaware-config.txt (wireless-ssid value) so the normal piaware scripts handle the operation for me?

Edited: In reviewing /usr/lib/piaware-support/generate-network-config, I see code for encoding passwords but not ssid. I’ve temporarily hacked the generate script above to temporarily handle my situation.

Any advice on getting a change like this into the piaware stream?

If you can create a pull request at GitHub - flightaware/piaware-support: Configuration support package for PiAware sdcard images that is the most straightforward way

failing that, explain what needs changing (do you just need an equivalent “don’t quote 64-character hex strings” for SSIDs as well as the PSK?) and I’ll add it to the list…