ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Feature] utf-16 string search

Open lllama opened this issue 2 years ago • 5 comments

What feature would you like to see?

The current string search assumes utf8 - an option to search for utf16 strings (and other encodings) would be very useful.

How will this feature be useful to you and others?

Quicker searching of utf16 strings (rather than finding all strings and then filtering)

Request Type

  • [ ] I can provide a PoC for this feature or am willing to work on it myself and submit a PR

Additional context?

No response

lllama avatar Sep 26 '23 10:09 lllama

Assign me I am willing to contribute @WerWolv :)

StArBoY-Works avatar Nov 05 '23 12:11 StArBoY-Works

Please indeed consider other encodings as well, since e.g. Japanese games are notorious for sticking to SJIS to this day (see also #959).

arcusmaximus avatar Nov 10 '23 20:11 arcusmaximus

Honestly at that point we should think about a better way of doing this. Maybe through the custom encodings? I really do not want to implement 5457542 different encodings in ImHex

WerWolv avatar Nov 10 '23 21:11 WerWolv

Maybe through the custom encodings?

Yes, of course. Could be a choice between UTF8, UTF16, and the currently loaded custom encoding.

arcusmaximus avatar Nov 10 '23 22:11 arcusmaximus

I tried making a custom encoding file for UTF16, but it didn't work out quite well, heh. I'd like to see someone succeed.

Nemoumbra avatar Nov 10 '23 22:11 Nemoumbra

imagen Got a basic implementation, still not perfect but it's something!

PerikiyoXD avatar Jan 10 '24 21:01 PerikiyoXD

imagen Added endianness and UTF8-16-32 search properly

PerikiyoXD avatar Jan 10 '24 22:01 PerikiyoXD