bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/27551] The default encoding of the strings utility does no


From: vincent-srcware at vinc17 dot net
Subject: [Bug binutils/27551] The default encoding of the strings utility does not conform to POSIX: should honor the current locale.
Date: Wed, 07 Apr 2021 22:36:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27551

--- Comment #2 from Vincent Lefèvre <vincent-srcware at vinc17 dot net> ---
Hi Nick,

(In reply to Nick Clifton from comment #1)
>   You can achieve the desired decoding by setting the character width
>   on the command line, like this:
> 
>     % echo abcdéfghi | ./binutils/strings -e S
>     abcdéfghi

"-e S" does not work with UTF-8, where I get a lot of binary data.

I think that the correct solution is to use isprint(), which automatically
honors the current locale if

  setlocale (LC_ALL, "");

has been used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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