wincmd.ini: 'SetEncoding=äö.do.not.remove'

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sexy69
Member
Member
Posts: 124
Joined: 2016-06-22, 17:21 UTC

wincmd.ini: 'SetEncoding=äö.do.not.remove'

Post by *sexy69 »

When I run the TC it appears in Wincmd.ini in the [Configuration]:
this entry: SetEncoding=äö.do.not.remove

If I delete it and re-run TC
again this entry appears.

What causes it?
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

From HISTORY.TXT

Code: Select all

17.08.16 Fixed: Write SetEncoding=äö.do.not.remove to wincmd.ini [Configuration] on load, to prevent notepad from opening/saving the file as UTF-8 when it contains UTF-8 encoded parts (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50861
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is done because the Windows ini file functions do not support UTF-8 Unicode. If notepad saves the file as UTF-8 by mistake, it will cause a lot of problems.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

sexy69,
SetEncoding=äö.do.not.remove
I delete it
You are quite the rebel.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Perhaps parameter name is not so clear... Maybe something like EncodingMarker would be better.
User avatar
beb
Power Member
Power Member
Posts: 592
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Post by *beb »

It is displayed a bit differently in my wincmd.ini:
SetEncoding=дц.do.not.remove
(with Cyrillic Ukrainian for non Unicode apps)
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 16
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

beb,
You're right, and it is because ANSI encoding is not a unique one, same bytes represent different characters in different codepages. But it doesn't matter here, the only reason of using these two bytes in this parameter is preventing opening and saving INI file in UTF-8 encoding (these two bytes represent invalid UTF-8 sequence) which is not a valid encoding for INI files.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50861
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I chose these two bytes because they give valid character(s) in all encodings, including double byte encodings like Chinese, but NOT in UTF-8.
Author of Total Commander
https://www.ghisler.com
Post Reply