+[8.50b2] Google search fails with Codepage=0

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

+[8.50b2] Google search fails with Codepage=0

Post by *MVV »

I have text document in ANSI encoding that contains national characters (Cyrillic in my case).
Google search from Lister works fine with encoding 'As configured for current font'.
However with 'ANSI (local code page)' it passes same text in wrong encoding while text looks 100% identical in both modes.

Required INI values:

Code: Select all

[Lister]
Font1=Courier New,-13,204
Codepage=0
Last edited by MVV on 2013-09-10, 15:07 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't have this problem with my PC (using Western encoding), so I will have to check it with Cyrillic.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I failed to reproduce it. Here is what I tried:
1. Set the locale for non-unicode programs to Russian
2. Rebooted Windows as requested
3. Opened Lister with some Russian ANSI text
4. Changed encoding to "local code page"
5. Selected text and sent it to Google via right click
-> Firefox was looking for the correct Russian text

So what is wrong? What do I need to choose for the font to reproduce it?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Test file:

Code: Select all

MIME-Version: 1.0 
Content-Type: application/octet-stream; name="1.txt" 
Content-Transfer-Encoding: base64 
Content-Disposition: attachment; filename="1.txt" 

7ODs4CDs++vgIPDg7PM=
Any word may be used for test. It was reproduced in both russian/english Win7 with Russian codepage for non-Unicode programs.

Ah, tested it with clean INI and failed to reproduce. You need to set font in Lister:

Code: Select all

[Lister]
Font1=Courier New,-13,204
Codepage=0
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, these settings seem to trigger the error, thanks!

Btw, the same problem seems to occur with "Copy to clipboard" in Lister. I will fix it.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Bug still exists in 8.50b3...

BTW it is interesting that it copies correct text if I switch keyboard layout to RU...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's strange, I have just re-tested it with 32-bit and 64-bit version, and it work with English, Russian, German and even Korean keyboard layout.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I tried it with INI that contains only three lines (mentioned in first post).

Sorry, I've tested only text copying.
Google search works fine in 8.50b3.
However text is still copied in wrong encoding (Ctrl+C or context menu) when keyboard layout is EN. Instead of "подразделение" it copies "ïîäðàçäåëåíèå".
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I will check that - but I'm now using CP_ACP when encoding is set to ANSI. Is this wrong?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that something is wrong. I think you should use same piece of code for both google and text copy (code for google works fine).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I thought that I am using the same code, but maybe I made a mistake (I developped this on a virtual computer so I don't need to reboot my main PC).
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I could reproduce it now in Lister!
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks, works in 8.50b4!
Post Reply