Ticket #3695 (closed defect: duplicate)
Hex search fails to find binary data
Reported by: | mooffie | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | mc-search | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
In the common situation where the user uses a UTF-8 terminal and default encoding, "Hexadecimal" search fails to find data in binary files.
That's because the regexp is created in UTF-8 mode (!G_REGEX_RAW) but the binary data is invalid UTF-8 sequence.
It's relatively easy to fix this, but I'll have to wait till #3694 gets committed (as it fixes quoted strings in hex patterns, which may be a game changer).
(BTW, in the mailing list I instructed a user to tick the "All charsets" checkbox to work around this bug. The checkbox causes additional regexps to be created not in UTF-8 mode (that is, G_REGEX_RAW) -- it's the 1st of these extra regexps that's actually going to find the data.)
Related to #3589.