LOADLIST command and UTF8 file lists
Moderators: Hacker, petermad, Stefan2, white
LOADLIST command and UTF8 file lists
It looks like the Loadlist command can't handle file lists formatted UTF8 without Bom.
Everything commandline tool creates such lists.
TC complains File not found (46x) followed by 5 dir names and ...
The list is valid and contains no illegal entries for dirs or files.
Other file managers (XYplorer and Free Commander) handle the same list without any problem.
Everything commandline tool creates such lists.
TC complains File not found (46x) followed by 5 dir names and ...
The list is valid and contains no illegal entries for dirs or files.
Other file managers (XYplorer and Free Commander) handle the same list without any problem.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST command and UTF8 file lists
Confirmed.
Even if lister recognizes the list file without BOM as UTF-8 then the LOADLIST command does not.
Even if lister recognizes the list file without BOM as UTF-8 then the LOADLIST command does not.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: LOADLIST command and UTF8 file lists
I cannot reproduce this with TC 10. I created a list file via Mark - Save selection to file, then loaded it into notepad and saved as UTF-8 without BOM.
Then tried loading the list via LOADLIST, and it works.
The detection is turned off when
1. The encoding is one of the following:
SHIFTJIS_CHARSET or
GB2312_CHARSET or
HANGEUL_CHARSET or
CHINESEBIG5_CHARSET
and
2. There are no UTF-8 sequences longer than 2 bytes.
In this case the file can be both UTF-8 or 2 byte local encoding.
Also "Load selection from file" does NOT support UTF-8 without BOM.
Please provide a few file names with which it doesn't work.
Then tried loading the list via LOADLIST, and it works.
The detection is turned off when
1. The encoding is one of the following:
SHIFTJIS_CHARSET or
GB2312_CHARSET or
HANGEUL_CHARSET or
CHINESEBIG5_CHARSET
and
2. There are no UTF-8 sequences longer than 2 bytes.
In this case the file can be both UTF-8 or 2 byte local encoding.
Also "Load selection from file" does NOT support UTF-8 without BOM.
Please provide a few file names with which it doesn't work.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: LOADLIST command and UTF8 file lists
Christian, we are not talking about "Load selection from file"
Its about LOADLIST.
The file lists I use are normaly not having a Bom
but also UTF8 with Bom fails for me.
File names or dir names with German characters are the problem in my tests.
Its about LOADLIST.
The file lists I use are normaly not having a Bom
but also UTF8 with Bom fails for me.
File names or dir names with German characters are the problem in my tests.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST command and UTF8 file lists
Sorry, my bad.
I accidently tested LOADSELECTION, which does not always work from UTF-8 list files without BOM.
The LOADLIST command here does work for UTF-8 list files without BOM.
Testfil: https://madsenworld.dk/tcmd/Listtest.zip
I accidently tested LOADSELECTION, which does not always work from UTF-8 list files without BOM.
The LOADLIST command here does work for UTF-8 list files without BOM.
Testfil: https://madsenworld.dk/tcmd/Listtest.zip
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: LOADLIST command and UTF8 file lists
UTF8 without bom is not a regular format for windows OS ! As said by Christian G. LOADLIST is not designed to work with utf8 no BOM files.
This is also the same for UTF16 no bom or BE variant !
Some software produce output without BOM as temp file, this is very convenient to combine multiple results !
You must instruct file processing about the format by bom or by parameter/variant. Automatic decoding can be an ambiguous decoding in some circumstance.
To my knowledge, we do not have loadlist[W|U] command to force UTF8 or UTF16 decoding when no bom is present. The easiest is to add the BOM using intermediate script or ask everything development to add the BOM.
LOADLIST works fine with UTF8/UTF16-LE file with bom and when all files exists !
You could suggest to add LOADLISTW / LOADLISTU ... or have an additional parameter.
This is also the same for UTF16 no bom or BE variant !
Some software produce output without BOM as temp file, this is very convenient to combine multiple results !
You must instruct file processing about the format by bom or by parameter/variant. Automatic decoding can be an ambiguous decoding in some circumstance.
To my knowledge, we do not have loadlist[W|U] command to force UTF8 or UTF16 decoding when no bom is present. The easiest is to add the BOM using intermediate script or ask everything development to add the BOM.
LOADLIST works fine with UTF8/UTF16-LE file with bom and when all files exists !
You could suggest to add LOADLISTW / LOADLISTU ... or have an additional parameter.
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: LOADLIST command and UTF8 file lists
2Horst.Epp
Did you actually read and understand my reply? I wrote that LOADLIST does support UTF-8 without BOM, just "Load selection from file" doesn't.
That's why I asked for a list of names where it doesn't work for you.
Did you actually read and understand my reply? I wrote that LOADLIST does support UTF-8 without BOM, just "Load selection from file" doesn't.
That's why I asked for a list of names where it doesn't work for you.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: LOADLIST command and UTF8 file lists
Its a long list and I just try to identify the real problem names.ghisler(Author) wrote: 2021-10-05, 09:53 UTC 2Horst.Epp
Did you actually read and understand my reply? I wrote that LOADLIST does support UTF-8 without BOM, just "Load selection from file" doesn't.
That's why I asked for a list of names where it doesn't work for you.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST command and UTF8 file lists
You can download files sent by @PeterMad .ghisler(Author) wrote: 2021-10-05, 09:53 UTC That's why I asked for a list of names where it doesn't work for you.
and from the folder where file are extracted create a button like:
Code: Select all
TOTALCMD#BAR#DATA
LOADLIST
%P%N
wcmicons.dll,3
-1
Re: LOADLIST command and UTF8 file lists
2nsp
Just to make it clear: LOADLIST works fine with the files in https://madsenworld.dk/tcmd/Listtest.zip and the listutf8nobom.txt file - it is LOADSELECTION that doesn't select most of those files with listutf8nobom.txtYou can download files sent by @PeterMad .
and from the folder where file are extracted create a button like:
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: LOADLIST command and UTF8 file lists
Just "installed" TC 10 and can confirm that LOADLIST has issues. That is to say:
A button on the buttonbar that runs LOADLIST t:\export.txt works fine, regardless the encoding (ANSI, UTF8, UTF8-BOM).
However, running it from TC's prompt generates the following error, with all mentioned encodings:
For reference, t:\export.txt (basically some random files with only lower ASCII characters):
BTW: A command-line parameter to load said file list could be useful. Especially when that file list was generated by an external applicatiuon.
A button on the buttonbar that runs LOADLIST t:\export.txt works fine, regardless the encoding (ANSI, UTF8, UTF8-BOM).
However, running it from TC's prompt generates the following error, with all mentioned encodings:
Code: Select all
---------------------------
Total Commander
---------------------------
File not found!
LOADLIST
"The system cannot find the file specified."
---------------------------
OK
---------------------------
For reference, t:\export.txt (basically some random files with only lower ASCII characters):
Code: Select all
C:\Tools\WinMerge_2011.007.444_x64\WinMergeU.exe
C:\Tools\UniExtractRC3\UniExtract\bin\RAIU.EXE
C:\Tools\UniExtract\bin\RAIU.EXE
C:\Tools\cygwin64\bin\du.exe
BTW: A command-line parameter to load said file list could be useful. Especially when that file list was generated by an external applicatiuon.
Re: LOADLIST command and UTF8 file lists
2NotNull
Except for the CD command ALL the commands in the "Commands with parameters" section of totalcmd.inc can NOT be run from the command line - this is not an restriction of the LOADLIST command exclusively
Except for the CD command ALL the commands in the "Commands with parameters" section of totalcmd.inc can NOT be run from the command line - this is not an restriction of the LOADLIST command exclusively
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: LOADLIST command and UTF8 file lists
That is quite a restriction ... Do you happen to know why?
Anyway, thanks for clarifying!
Anyway, thanks for clarifying!
Re: LOADLIST command and UTF8 file lists
2NotNull
This command will work in the command line with the file under the cursor.
--------------------
You can also make it work with a filename on the command line with this version:
And then make an Alias for the em_loadlist command in your wincmd.ini:
Then you can type: LOADLIST t:\export.txt in the command line as you wanted...
You can just make an em_loadlist command with the LOADLIST in your usercmd.ini file for it, and then use that em_loadlist in th command line - for example:That is quite a restriction
Code: Select all
[em_loadlist]
cmd=LOADLIST
param=%P%N
--------------------
You can also make it work with a filename on the command line with this version:
Code: Select all
[em_loadlist]
cmd=LOADLIST
param=%A
Code: Select all
[Alias]
LOADLIST=em_loadlist
Last edited by petermad on 2021-10-07, 22:02 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: LOADLIST command and UTF8 file lists
Thanks!
(that is basically what I did as a workaround: creating an em_.. user command. Didn't know about aliases though; handy!)
(that is basically what I did as a workaround: creating an em_.. user command. Didn't know about aliases though; handy!)