Re: ifconfig(8) IEEE802.11 SSID format

From: 吳恩緯 <rickywu0421_at_gmail.com>
Date: Tue, 18 Oct 2022 07:17:49 UTC
Sorry for not explaining the whole situation.

The previous email was asking for everyone about how to solve the problem
explained in it, and I also introduced a way to deal with it, which may or
may not be adopted.

吳恩緯 <rickywu0421@gmail.com> 於 2022年10月18日 週二 上午11:25寫道:

> 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.
>