bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] How to print an unsigned char?


From: Peng Yu
Subject: [bug-gawk] How to print an unsigned char?
Date: Tue, 19 Feb 2019 14:41:20 -0600

137 is printed as two characters. Is there a way to print a single
character corresponding the number 137 as in C?

$ awk 'BEGIN { printf("%c", 137) }' | xxd
00000000: c289

#include <stdio.h>

int main() {
        printf("%c", 137);
        return 0;
}                            ..

$ ./main.exe |xxd
00000000: 89                                       .

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]