Skip to content

Commit 1d70114

Browse files
committed
refactor CSearchDlg::SearchFile
* separate out transcoded and raw processing into functions For raw processing: * most used encodings should be: ANSI, UTF8 and UTF-16LE * try ANSI, UTF8 and UTF-16BE only in char * treat UTF-16LE and Binary as char for text search/replace * only try UTF-16LE aligned in wchar_t for UTF-16LE * try UTF-16LE aligned and misaligned in wchar_t for Binary only * try UTF-16LE in wchar_t for Binary only when char mode has no result * fix Replace in UTF-16LE * text search is text mode for both search and replace know issues: * Treating a multi-byte char as single byte chars: yields part of it may be matched as a standalone char, so requires non-ASCII char grouped for repeats to get accurate results. Still, Line and Column maybe wrong. * Some encodings are treated as Binary, real binary file may need 2 rounds processing, backup is overwriten in the 2nd round.
1 parent cab17f6 commit 1d70114

File tree

4 files changed

+622
-476
lines changed

4 files changed

+622
-476
lines changed

0 commit comments

Comments
 (0)