ifconfig(8) IEEE802.11 SSID format
- Reply: 吳恩緯 : "Re: ifconfig(8) IEEE802.11 SSID format"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Oct 2022 03:25:30 UTC
Currently `ifconfig wlanX scan` will show SSID in hex when the scanned SSID is non-printable. And the non-printable character is when the character with value < 32 or value >= 126 in ifconfig(8)'s implementation. That leads to a problem that other languages using UTF-8 or other encoding will be treated as non-printable in ifconfig(8), thus not printed on screen. Here is the possible way to solve the problem: When a SSID is going to be printed, copy the byte stream (uint8_t *) into wide character stream (wchar_t *), and use libc iswprint(3) to check whether characters are printable or non-printable. I have tested this and it is workable when the locale is correctly set.