tcpdump
tcpdump copied to clipboard
fix #1190 support to display packet content as UTF-8
This PR adds a new --utf8 option to enable UTF-8 character support.
When UTF-8 support is enabled, tcpdump will detect and display UTF-8 characters in the payload as-is when using the -A option.
Note that in -X mode, if a multi-byte character spans across two lines, it will appear on the first line, and a spaces will be padded on the next line.
Tests
- Verified with several random PCAP files dumped using
-Aand-x, ensuring their MD5 checksums remain identical without --utf8. - Manually tested using a UTF-8 sample PCAP on macOS.