-
Notifications
You must be signed in to change notification settings - Fork 900
fix #1190 support to display packet content as UTF-8 #1382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
992ccb1 to
6ee3b82
Compare
8934b1e to
2ecc6b2
Compare
2ecc6b2 to
354fa81
Compare
|
I tried this on Windows using MSVC and clang-cl. But there is no print-ascii.c(118,11): error: call to undeclared function 'wcwidth'; ISO C99 and later do not support implicit function declarations
[-Wimplicit-function-declaration]
118 | int w = wcwidth(wc);
| ^ |
|
How did it build in Appveyor then? |
Since |
9c0622f to
a5fa5a2
Compare
|
@gvanem Could you please help me give it another try on Windows? I’ve added Markus Kuhn’s implementation as a replacement on Windows. |
a5fa5a2 to
6629672
Compare
6629672 to
a13a471
Compare
|
@gvanem Please help to try again with latest code, it turns out that locale should be set correctly for (left: tcpdump, right: cat. Compiled on Windows 11 with VS 2022, Shell: PowerShell with
|
a448b15 to
d991fd2
Compare
|
tcpdump CI is failing because of my recent changes in libpcap. Please wait until this is fixed. |
@infrastation Got it, Thanks~ |
a5fa5a2 to
a13a471
Compare
|
Work very well now! |




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
-Aoption.Note that in
-Xmode, 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
-Aand-x, ensuring their MD5 checksums remain identical without --utf8.utf8.pcap.zip