Error with md5-file in UTF format

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Error with md5-file in UTF format

Post by *LonerD »

If the md5-file in UTF format, TC can not correctly identify the name of the file and check the checksum.
Error with Cyrillic file names.
Example:
http://rghost.ru/38396006
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Error with md5-file in UTF format

Post by *white »

LonerD wrote:If the md5-file in UTF format, TC can not correctly identify the name of the file and check the checksum.
Error with Cyrillic file names.
There is no BOM in the md5 file. Should the md5 file be detected as UTF?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC currently only detects UTF-8 checksum files by BOM. UTF-16 checksum files are also detected without BOM by the location of 0 bytes within the file, which do not appear in ANSI or UTF-8 files.
Author of Total Commander
https://www.ghisler.com
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

ghisler
Can you add UTF-16 ?
Some programs create md5-checksum files in this format, and Total can't check this checksum correctly.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

LonerD wrote:ghisler
Can you add UTF-16 ?
Some programs create md5-checksum files in this format, and Total can't check this checksum correctly.
It should work. Can you supply a test file?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually UTF-16 should already work with and without BOM.
Author of Total Commander
https://www.ghisler.com
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

ghisler(Author)
Please, add all varians for checksum files - UTF-16 (LE/BE) and UTF-8 with ВОМ/without BOM.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

LonerD wrote:ghisler(Author)
Please, add all varians for checksum files - UTF-16 (LE/BE) and UTF-8 with ВОМ/without BOM.
All variants UTF-16, LE/BE and with ВОМ/without BOM, should already work. Do you have an example that does not work?
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

Do you have an example that does not work?
In first post.
Files with Cyrillic names.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

[mod]Moved to Suggestions forum.

White (moderator)
[/mod]
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

Actually.
Example:
http://rghost.ru/48427211
File with cyrillic name Файл.txt
md5-file generated with Fsum Frontend
TC cann't check this file with command cm_CRCcheck.
Error:
"Cannot open input file Файл.txt !"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately the file is missing the UTF-8 byte order marker (BOM). Therefore TC assumes that it's an ANSI file. If you open the file with notepad and just save it, then the check works.
Author of Total Commander
https://www.ghisler.com
User avatar
MaxX
Power Member
Power Member
Posts: 1189
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

I've tested such scenario:
1. Gen md5 file by TC (in cp1251)
2a. ReSave this md5 file to utf8 by AkelPad
2b. ReSave this md5 file to utf16le by AkelPad

Both "2a" and "2b" files are valid for TC and md5-check works fine.
Ukrainian Total Commander Translator. Feedback and discuss.
Post Reply