Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gnu-binutils-strings utf-8 instead of utf-16 or ascii

I've noticed gnu-binutils-strings can printout utf-16 content in a file - is it possible for the program to print out utf-8 strings? if so, which arguments are appropriate? i'm working in a python environment using subprocess and would like to work with the output from gnu-binutils-strings that a subprocess.Popen call would generate through a pipe.

like image 244
ct_ Avatar asked Oct 23 '25 09:10

ct_


1 Answers

I'm not experienced with strings, but the version I have (2.21.51.20110605) has an 8-bit encoding option (-eS) that would work with utf-8 text. It must have to cast a wide net looking for 'text' delimited by non-printable characters (value < 32). I'd expect a lot of noise. A test on a random executable showed the -eS (8-bit) result was 5 times bigger than -es (7-bit).

like image 121
Eryk Sun Avatar answered Oct 25 '25 13:10

Eryk Sun