Multi-rename tool can not save setting with unicode

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I will check it. Do you have this problem only in the rename tool, or also in other places?
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 have checked only locations that were reported here. Name and extension patterns aren't restored properly in case of UTF-16 INI.

Well, I've tested also Find Files dialog and noticed some interesting bug. Please check this INI:

Code: Select all

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

W1NlYXJjaGVzXQ0KMTExX1NlYXJjaEZvcj3vu7/jg4bjgrnjg4gNCjExMV9TZWFyY2hJbj3vu7/j
g4bjgrnjg4gNCjExMV9TZWFyY2hUZXh0Pe+7v+ODhuOCueODiA0KMTExX1NlYXJjaEZsYWdzPTF8
MDAyMDAyMDAwMDIwfHx8fHx8fHx8MDAwMHwNCjExMV9wbHVnaW4977u/dGMuZnVsbG5hbWUgY29u
dGFpbnMg44OG44K544OIDQo=
1. TC can't decode field values (search for, search in, find text) in case of UTF-16 INI - it is expected.
2. Please notice that plugin value field is not restored at all (it is empty) in case of UTF-16 INI!
3. TC shows incorrect description under the listbox on Load/Save tab (with non-decoded BOM+UTF8 strings) regardless of INI encoding.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

???
The file you posted, wincmd_search.ini, isn't UTF-16, but UTF-8?
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 only post ANSI INI files (with UTF8 BOM Unicode strings saved by TC). I can't convert them to Unicode for you because our ANSI codepages differ.
Please convert it from your local ANSI codepage into Unicode and test.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Do I need to remove the BOMs to recreate the problem, or is problem happening only with BOMs present?
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 »

ghisler(Author),
My attached file is pure ANSI without BOM (BOMs are only in strings but they are necessary for TC there). Unicode INI files tested by me were with BOMs (UTF-16 LE with BOM).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I found the problem: One of the functions I use to write to the ini files doesn't recognize Unicode INI files, and uses the ANSI functions to write. The problem is that the BOM is then translated to Unicode using the current user locale. For cyrillic, this gives a different code than for western encoding. Once the string is correctly put in the ini (e.g. manually), it can be read by TC. 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 »

Nice, thanks!
Post Reply