View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003607 | Far Manager | FindFiles | public | 2018-05-15 09:54 | 2018-05-17 09:02 |
Reporter | uwe-sieber | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | x64 | OS | Windows | OS Version | 7 |
Product Version | 3.0 | ||||
Summary | 0003607: Search for Unicode text in binary files unreliable | ||||
Description | FAR's "Find file", "Containting text" does not always find binary files even they contain the text searched for as UTF-16 text. | ||||
Steps To Reproduce | The attached XLS file contains two filled cells with "Bart" and "Lisa". FAR finds the file if then searched text is "Lisa" but it does not find the file if searched text is "Bart". "Bart" starts at 0x92F, "Lisa" at 0x93A. I've tried "Unicode (Little endian)" and "Automatic detection". | ||||
Tags | Search | ||||
Build | |||||
|
|
|
> "Bart" starts at 0x92F, "Lisa" at 0x93A. That's the reason. 0x92f is 2351, an odd number. UTF-16 search simply interprets your file as a sequence of 16-bit codepoints, each of them has an even address by definition. So from this perspective the file does not contain "Bart" (0042 0061 0072 0074), but contains "䈁愀爀琀" (4201 6100 7200 7400). |
|
But why it doesn't find Lisa? |
|
It does |
|
Sorry did not read carefully enough. |
|
I think even the codepage is a 16 Bit format the search should just look for the byte sequence. False positives seem to be very unlikely, at least if the seach text isn't too short... |
|
Ok, let's say we implement it. Presumably your next ticket will be "Search finds 'Bart' in the file, but neither Viewer nor Editor show it in any code page"? |
|
No, this is about search in binary files. The Editor are strictly for text files, the viewer shows the byte sequence in hex view. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-05-15 09:54 | uwe-sieber | New Issue | |
2018-05-15 09:54 | uwe-sieber | File Added: bart_lisa.xls | |
2018-05-15 09:54 | uwe-sieber | Tag Attached: Search | |
2018-05-15 10:39 | DrKnS | Note Added: 0016111 | |
2018-05-15 10:52 | shmuel | Note Added: 0016112 | |
2018-05-15 10:52 | shmuel | Note Edited: 0016112 | |
2018-05-15 11:31 | JohnDoe | Note Added: 0016113 | |
2018-05-15 11:39 | shmuel | Note Added: 0016114 | |
2018-05-16 16:36 | uwe-sieber | Note Added: 0016115 | |
2018-05-16 22:28 | DrKnS | Note Added: 0016116 | |
2018-05-17 09:02 | uwe-sieber | Note Added: 0016120 |