Re: ifconfig(8) IEEE802.11 SSID format

From: Chris <bsd-lists_at_bsdforge.com>
Date: Tue, 18 Oct 2022 15:03:57 UTC
On 2022-10-18 00:17, 吳恩緯 wrote:
>> 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.
>> 
> 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寫道:
> 
Maybe a differential[1] or a pr[2] would be in order, so that others can
profit from your work here? :-)

--chris

1) https://reviews.freebsd.org
2) https://bugs.freebsd.org