tshark - SSID name has UTF-8 replacement character?
Hi there, I'm having a problem with this command in tshark, trying to get 802.11 probe requests in monitor mode:
tshark -o nameres.mac_name:FALSE -l -I -i wlan0mon -Y "wlan.ssid != 0" "wlan type mgt subtype 0100" > ./tshark_output
Everything is going well, except for some lines, that go like this:
7067 2122.734629754 e0:98:61:xx:xx:xx → ff:ff:ff:ff:ff:ff 802.11 144 Probe Request, SN=615, FN=0, Flags=........C, SSID=administraci\357\277\275
that SSID should read (probably) as "administración", and as you can see, tshark is replacing that "ó" with the UTF-8 replacement character...
reading the tshark docs, I've found this:
TShark uses UTF-8 to represent strings internally. In some cases the output might not be valid. For example, a dissector might generate invalid UTF-8 character sequences. Programs reading TShark output should expect UTF-8 and be prepared for invalid output.
Is there anything I can do to solve this? any other flag? or I should just deal with the fact that tshark can't handle accent marks at all?
EDIT: Also, can somebody enlight me on what the "SN" and "FN" columns really mean?
EDIT2: I'm on Linux Mint 19.2, bash 4.4.20. I also run the command from Python's subprocess.Popen with shell=FALSE flag, giving the same results.
What OS and what shell are you running this on?
I'm on Linux Mint 19.2, bash 4.4.20. I also run the command from Python's subprocess.Popen with shell=FALSE flag, giving the same results.
OK, what's your locale, i.e. the output of
locale
?output:
See the discussion here on this subject.