Multi-rename tool can not save setting with unicode
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50923
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
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:
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.
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=
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.
- ghisler(Author)
- Site Admin
- Posts: 50923
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
???
The file you posted, wincmd_search.ini, isn't UTF-16, but UTF-8?
The file you posted, wincmd_search.ini, isn't UTF-16, but UTF-8?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50923
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50923
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com