This is the mail archive of the
mailing list for the binutils project.
Offering enhancement to 'strings'
- From: Ralf Brown <ralf dot brown at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 25 Jul 2011 15:05:58 -0400
- Subject: Offering enhancement to 'strings'
I've added support for UTF-8 and EUC encodings to the strings(1) code,
and would like to contribute the changes back to the FSF. I'm willing
to sign a copyright assignment.
I saved multiple checkpoints during the update, so I can offer a
series of incremental patches starting with the CVS version as of the
morning of 2011-07-25:
Patch 1: Simple refactoring to move the actual reading of bytes from
get_char() into its own function get_byte(), as we will be using this
code multiple times.
Patch 2: Move the decision of whether a character is a desired
graphical character into get_char() and adjust print_strings()
Patch 3: Enhance the character-handling code in print_strings() to
deal with multi-byte characters.
Patch 4: Add UTF-8 processing to get_char() and add new 'u' encoding
type in main().
Patch 5: Add baseline EUC processing to get_char() and add new 'e'
encoding type in main().
I look forward to hearing from you.