Listener: search not work in ANSI locale

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
exidler
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-22, 15:49 UTC

Listener: search not work in ANSI locale

Post by *exidler »

Total Commander 9.12 x32,
Windows 10 x64 build 1709,
Windows locale - EN, Windows regional settings - Russia, Windows locale for non-unicode programs - Russia.

Listener, plain text in ANSI (Windows charset), text in cp-1251 displayed fine, search with russian letters does not find anything, but must find.
Search by text in Total Commander (Find files -> Find text) works fine, and file with matched text shown.

If any more details need - can post.
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2exidler
I haven't such problem with the same settings, but under Windows 7.
(English Windows, Regional settings - Russia, Windows locale for non-unicode programs - Russia.)
Possibly Windows 10 bug?
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't think it's a Windows 10 problem. I have tried with a Russian text files in cp-1251 format, F3, set format to Cyrillic Windows (1251), search works. However, I'm using "Western" encoding, so search doesn't find cyrillic when using default or ANSI (0) options.
Author of Total Commander
https://www.ghisler.com
exidler
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-22, 15:49 UTC

Post by *exidler »

Have tested search with different encoding setting:
- As configured for current Font => work.
- Cyrillic Windows 1251 => work.
- ANSI (local code page) (0) => does not work.

I have configured non default font for ANSI with script Cyrillic.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have configured non default font for ANSI with script Cyrillic.
So you mean that your system is set to Western, but you use a font which displays characters as cyrillic? Sorry, this will not work, because then TC will use Western for search.
Author of Total Commander
https://www.ghisler.com
exidler
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-22, 15:49 UTC

Post by *exidler »

ghisler(Author) wrote:
I have configured non default font for ANSI with script Cyrillic.
So you mean that your system is set to Western, but you use a font which displays characters as cyrillic? Sorry, this will not work, because then TC will use Western for search.
No, my system is English language with Russia location, Russia format settings and Russia for non unicode programs.
Font - changed to non default, because I like Consolas font.

And only one case, when search does not work (in russian language): Listener => Encoding => Ansi (local code page) (0)

If it's desired behaviour - ok.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, this should definitely work. Lister would use CP_ACP (active code page) to convert the Unicode search text to the default ANSI encoding, which should be Russian in your case. For some reason, CP_ACP seems to be not Russian in your system.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in TC 9.20 beta 1, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

history920.txt wrote:10.04.18 Fixed: Lister: Couldn't find Cyrillic text under special conditions: language for non-Unicode programs=Russian, encoding=Ansi (0), default font was changed (32/64)
I could reproduce the issue, as described in history920.txt, in TC 9.12 on russian Windows Vista 32-bit, and can confirm the fix for TC 9.20 on Vista 32-bit.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply