how wpa_suppliant processes the chinese characters
j at w1.fi
Fri Dec 25 07:32:06 EST 2009
On Fri, Dec 25, 2009 at 05:34:43PM +0800, root wrote:
> i am from china, so some of our ap's ssid is chinese characters,but
> when i use the wpa_gui to scan, and i got the scan_result is something
> like "______",so i want to know where is the wpa_suppliant process the
> ssid, and maybe i can do some changes on it and make it to support
> chinese character.
wpa_supplicant processes SSID information as binary data and hopefully
the only change that could be needed is in wpa_supplicant/ctrl_iface.c.
In other words, the main code for deciding how to show the characters
should really be in the GUI application and wpa_gui would need to be
extended to handle this more nicely if the correct encoding can be
The stringified version of SSID does indeed filter out most of non-ASCII
characters and that is the likely source of the "______" SSIDs you see.
However, the BSS ctrl_iface command does give wpa_gui the raw SSID data
in the IE hexdump. Instead of modifying wpa_ssid_txt() to show something
else in the ssid field, it would probably be better idea to make wpa_gui
parse the SSID as binary data from the IE hexdump and then try to detect
which encoding was used based on the data and show that instead of the
SSID info from wpa_ssid_txt().
The main problem with non-ASCII characters in SSIDs is that there is no
standard on how those characters are encoded. In theory, one could use
UTF-8 and hope for the best, but there will likely always be some
applications that will not be able to show the characters correctly.
Which encoding are you you using for Chinese characters in the SSID?
Could you please send me a hex dump of an SSID that you would like to
see in wpa_gui?
Jouni Malinen PGP id EFC895FA
More information about the HostAP