Problem with filne name encoding
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Problem with filne name encoding
I have tried in vain to find a solution to my problem by searching forum archives, but to no avail, so I seem I need to ask for help in a new separate thread.
Here is my routine: I work on 64-bit machine under Windows 10 using NTFS Windows 1250 character set with TC 10.00 64-bit version. In the file panel I select a number of files and copy them to clipboard with the use of a proper TC function. Then I paste the list of files into a txt file to be used by IrfanView slideshow as a list of files to be displayed in the slideshow. A number of file names contain Polish diacritics which are properly displayed on the TC file lists as well as in the aforementioned txt file. But IrfanView will misinterpret the filenames and refuse to recognize Polish diacritics. I eventually found that after I encode the txt file into Windows 1250 code page with the use of a code page converter (such as CvGUInt.exe or any other similar software) IrfanView will properly interpret filenames and show the slideshow as required. A problem of the same nature occurs also when I want to use the txt file containing a filelist copied by TC into and pasted from the memory.
To solve the problem I tried to set TC Operation – Preferred Type to Utf-8, Utf–16 and plain text, but to no success and the problem persisted in each of these type settings.
Your help will be greatly apprieciated because the routine described above is a procedure I need to repeat several times a day and I would be happy to be able to skip the re-encoding the filelist in the txt file.
Regards,
Marek
PS One more remark for you. As I have come accross many threads on this forum in which codepage problems affected file search procedure/results and/or file commenting procedures, I should note, that I have not had any such problems with TC searching files with Polish discritics in the file names abd the files have been always properly identified and found. The same applies coments (Ctrl Z). I comment files extensively and never have I found any problems with the comment text readability.
Here is my routine: I work on 64-bit machine under Windows 10 using NTFS Windows 1250 character set with TC 10.00 64-bit version. In the file panel I select a number of files and copy them to clipboard with the use of a proper TC function. Then I paste the list of files into a txt file to be used by IrfanView slideshow as a list of files to be displayed in the slideshow. A number of file names contain Polish diacritics which are properly displayed on the TC file lists as well as in the aforementioned txt file. But IrfanView will misinterpret the filenames and refuse to recognize Polish diacritics. I eventually found that after I encode the txt file into Windows 1250 code page with the use of a code page converter (such as CvGUInt.exe or any other similar software) IrfanView will properly interpret filenames and show the slideshow as required. A problem of the same nature occurs also when I want to use the txt file containing a filelist copied by TC into and pasted from the memory.
To solve the problem I tried to set TC Operation – Preferred Type to Utf-8, Utf–16 and plain text, but to no success and the problem persisted in each of these type settings.
Your help will be greatly apprieciated because the routine described above is a procedure I need to repeat several times a day and I would be happy to be able to skip the re-encoding the filelist in the txt file.
Regards,
Marek
PS One more remark for you. As I have come accross many threads on this forum in which codepage problems affected file search procedure/results and/or file commenting procedures, I should note, that I have not had any such problems with TC searching files with Polish discritics in the file names abd the files have been always properly identified and found. The same applies coments (Ctrl Z). I comment files extensively and never have I found any problems with the comment text readability.
Re: Problem with filne name encoding
Which editor do you paste the filenames into? Which encoding do you specify when saving the file? With or without a BOM (Byte Order Mark)?
BTW, there's no need to make the detour via the clipboard, unless you need to modify something. TC can save the file list directly, and doing so creates a file in Unicode UTF-16 encoding with a BOM. Use menu Mark > Save Selection to File.
Regards
Dalai
BTW, there's no need to make the detour via the clipboard, unless you need to modify something. TC can save the file list directly, and doing so creates a file in Unicode UTF-16 encoding with a BOM. Use menu Mark > Save Selection to File.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Problem with file name encoding
You can also save selection directly to ANSI (locale) encoded file if you make button with "cm_SaveSelectionToFileA" command.
You can even run slideshow for selected files directly from TC using /slideshow parameter of Irfan and %L parameter of TC, e.g.:
(change Irfan View pathname if needed)
You can also change "%L" to "%UL" or "%WL" - all this works for me.
Also: you use just filenames or full paths?
do you receive such a errors while you send single file with diacritics to Irfan e.g. with button?
and very important - which version of Irfan View you use?
As for me all works perfectly even with such a names e.g: "ĄĆĘŁŃÓŚŹŻ ąćęłńóśźż.jpg"
You can even run slideshow for selected files directly from TC using /slideshow parameter of Irfan and %L parameter of TC, e.g.:
Code: Select all
TOTALCMD#BAR#DATA
%ProgramFiles%\IrfanView\i_view64.exe
?/slideshow=%L
%ProgramFiles%\IrfanView\i_view64.exe
Irfan Slideshow
-1
You can also change "%L" to "%UL" or "%WL" - all this works for me.
Also: you use just filenames or full paths?
do you receive such a errors while you send single file with diacritics to Irfan e.g. with button?
and very important - which version of Irfan View you use?
As for me all works perfectly even with such a names e.g: "ĄĆĘŁŃÓŚŹŻ ąćęłńóśźż.jpg"
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
Thanks a lof for your advice.
I used a simple combination of keys (CTRl F4) to create a file into which I pasted (Ctrl V) the list from the clipboard. You ask which editor, encoding (with BOM or without BOM) I use and I will honestly reyply that I do not know as I have used the (Ctrl F4) procedure on several occations to save many other clipbord text contents and never have there occurred any problems of encoding nature in further processing files so created. The contents, when opened in any editor showed properly with all diactitics in place. So I simply took this procedure as granted and did not seek further insight into further technical aspects. So your aforeme ntioned question will remain unanswered directly, but I hope that my description tells you all.
Cheers, Marek
I used a simple combination of keys (CTRl F4) to create a file into which I pasted (Ctrl V) the list from the clipboard. You ask which editor, encoding (with BOM or without BOM) I use and I will honestly reyply that I do not know as I have used the (Ctrl F4) procedure on several occations to save many other clipbord text contents and never have there occurred any problems of encoding nature in further processing files so created. The contents, when opened in any editor showed properly with all diactitics in place. So I simply took this procedure as granted and did not seek further insight into further technical aspects. So your aforeme ntioned question will remain unanswered directly, but I hope that my description tells you all.
Cheers, Marek
Dalai wrote: 2022-02-19, 22:44 UTC Which editor do you paste the filenames into? Which encoding do you specify when saving the file? With or without a BOM (Byte Order Mark)?
BTW, there's no need to make the detour via the clipboard, unless you need to modify something. TC can save the file list directly, and doing so creates a file in Unicode UTF-16 encoding with a BOM. Use menu Mark > Save Selection to File.
Regards
Dalai
Re: Problem with filne name encoding
Do you mean Shift+F4? If so, you can see which editor is opened, don't you? But I guess from your answer that you might never have changed the editor set in TC's options (Options > Edit/View), which means it's probably Notepad that is shipped with Windows. Even Notepad has an encoding setting when saving a file under a different name (Save As), although it doesn't provide an option for the BOM as far as I know.MarekCzerski wrote: 2022-02-21, 16:19 UTCI used a simple combination of keys (CTRl F4) to create a file into which I pasted (Ctrl V) the list from the clipboard.
As for the solution to your issue in conjunction with IrfanView, see the previous posts from Gral and me. Note that Gral's solution creates only a temporary file, but when it comes to IrfanView's slideshow they're the same.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with file name encoding
Thanks for your reply. As a matter of fact, the "combination" of TC and IrfanView you kidnly advised is what I actually eventually do but under the control of an application I wrote for my own use in VB 6 / C++ to sort out, enjoy etc. my colletions of photographs. My detailed replies to your questions are interspersed in your original message.
I have not had any problems with opening a single file with Polish diacritics in its path/name by pasting the path and filename initially put to clipboard by TC to the IrfanView file open procedure.
I got the same kind of problems with diacritics regardless whether I used full paths and name of files or only "bare" filenames.Gral wrote: 2022-02-20, 01:08 UTC You can also save selection directly to ANSI (locale) encoded file if you make button with "cm_SaveSelectionToFileA" command.
You can even run slideshow for selected files directly from TC using /slideshow parameter of Irfan and %L parameter of TC, e.g.:(change Irfan View pathname if needed)Code: Select all
TOTALCMD#BAR#DATA %ProgramFiles%\IrfanView\i_view64.exe ?/slideshow=%L %ProgramFiles%\IrfanView\i_view64.exe Irfan Slideshow [/quote] [quote] MC_ That’s exactly the version of IrfanView I use.
You can also change "%L" to "%UL" or "%WL" - all this works for me.
Also: you use just filenames or full paths?
do you receive such a errors while you send single file with diacritics to Irfan e.g. with button?
and very important - which version of Irfan View you use?
I have not had any problems with opening a single file with Polish diacritics in its path/name by pasting the path and filename initially put to clipboard by TC to the IrfanView file open procedure.
Now, thanks to the advice of yours and other fellows everthing runs fine for me. Thanks again! MarekAs for me all works perfectly even with such a names e.g: "ĄĆĘŁŃÓŚŹŻ ąćęłńóśźż.jpg"
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
Silly me. Of course, I meant Shift+F4 rather than Ctrl F4. Sorry for my misinformation.Dalai wrote: 2022-02-21, 16:37 UTCDo you mean Shift+F4?MarekCzerski wrote: 2022-02-21, 16:19 UTCI used a simple combination of keys (CTRl F4) to create a file into which I pasted (Ctrl V) the list from the clipboard.
All I see in the window invoked by Shift+F4 is "Total Commander" in the caption of the window and "Enter filename" in its body. No editor name there."
If so, you can see which editor is opened, don't you?
I did a number of changes and selected various options in Options > Edit/View procedure, but I did not change the editor as I simply did not see any reason so to do as everything worked fine for mie until the problem occured as described herein and solved thanks to the "intervention" of yours and of other fellows, for which I am really grateful.
But I guess from your answer that you might never have changed the editor set in TC's options (Options > Edit/View), which means it's probably Notepad that is shipped with Windows.
Thanks for valuable piece of knowledged that mnay occur really helpful to me in the future.Even Notepad has an encoding setting when saving a file under a different name (Save As), although it doesn't provide an option for the BOM as far as I know.
As for the solution to your issue in conjunction with IrfanView, see the previous posts from Gral and me. Note that Gral's solution creates only a temporary file, but when it comes to IrfanView's slideshow they're the same.
Best regard. Cheers,Regards
Dalai
Marek
Re: Problem with filne name encoding
Good to know that all works now.
We STILL don't now WHICH version of Irfan View you use - "64" in exe name is a bitness, not a version, to see which version you use press "A" on open Irfan window, but 64- bit version it's new enough to properly works with Polish names.
We STILL don't now WHICH version of Irfan View you use - "64" in exe name is a bitness, not a version, to see which version you use press "A" on open Irfan window, but 64- bit version it's new enough to properly works with Polish names.
Re: Problem with filne name encoding
And after confirming this dialog, the editor is opened.MarekCzerski wrote: 2022-02-21, 16:51 UTCAll I see in the window invoked by Shift+F4 is "Total Commander" in the caption of the window and "Enter filename" in its body. No editor name there.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
I am sorry to have missed to provide this item of information as I though that 64 bitness is enough. This is what Irfan View reports: Version 4.59 (Release date: 2021-12-01)Gral wrote: 2022-02-21, 17:03 UTC Good to know that all works now.
We STILL don't now WHICH version of Irfan View you use - "64" in exe name is a bitness, not a version, to see which version you use press "A" on open Irfan window, but 64- bit version it's new enough to properly works with Polish names.
Re: Problem with filne name encoding
Probably any 64-bit version is new enough to work with Polish names, some very old version, 32-bit only didn't works properly in this matter.
Note that sometime, very speciific bug can occurs even in newest version, so it's always important to provide as many information as possible about all used programs.
Note that sometime, very speciific bug can occurs even in newest version, so it's always important to provide as many information as possible about all used programs.
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
Sorry, again for my impreciseness. I will keep in mind your remark, for sure. And I seem I understand where your remark ws derived from. I have worked on computers for more than 3 decades (starting with the CPM system which was in use when nobody had heard of Windows), and I noticed that almost any new version needs to "settle" for some time to get free of bugs, defects etc. This "charming feature" is specifically typical as regards MS systems and packages, but other developers often seem to release software prematurely.Gral wrote: 2022-02-21, 19:18 UTC Probably any 64-bit version is new enough to work with Polish names, some very old version, 32-bit only didn't works properly in this matter.
Note that sometime, very speciific bug can occurs even in newest version, so it's always important to provide as many information as possible about all used programs.
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
There seem to be a workaround of the problem related to the aforementioned saving of filenames without their full paths. I simply set TC to serarch all files ("*.*") or graphic files in a single folder and it appeared that files selected from the search result were saved to the txt file with their full names and paths. If there is no other, straight choice, I will use this trick. But a smarter and more elegant solution would be welcome.
Re: Problem with filne name encoding
There is probably no more elegant solution than the one I described earlier - a button that sends a list of files to Irfan
The possibilities of TC are (almost) unlimited.
However, to advise you, we need to know what you want to achieve.
I thought after your earlier post that you have solved all the problems. So what do you really want to do?
The possibilities of TC are (almost) unlimited.
However, to advise you, we need to know what you want to achieve.
I thought after your earlier post that you have solved all the problems. So what do you really want to do?
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: Problem with filne name encoding
It seems that one of my messages has not come through.
I reported a problem with the feature of "Save Selection to File".
It occurred that when I select files from one and the same folder, the filenames are saved into a txt file withouth their full paths. And further, if the txt file with the filelist is saved in the same folder in which the selected files are kept, then IrfanView is capable to use the selection as file paths to the txt file are added by IrfanView automatically to each filename as soon as the txt file is read by IrfanView. All the filepaths added in this way are the same as they are just the path to the txt file as well as to the selected files. However, if I save the txt file with a filelist to a folder other than that in the selected files are kept, then IrfanView is hopeless as it cannot find files because filepaths added to them by IrfanViewa are the filepath of the txt file rather than of each single file selected.
It is interesting, however, that when I select files from a search result showing files in different folders, the "Save Selection to File" works properly and saves filenames with their various full file paths.
My question: is there a TC function that ALLWAYS allows to save selected files with their full paths. I tried a number of functions offered in the option of Misc > Redefine hotkeys (as I find this feature really handy), but to no avail. Hence, I have no choice, but to ask your kind advice.
I reported a problem with the feature of "Save Selection to File".
It occurred that when I select files from one and the same folder, the filenames are saved into a txt file withouth their full paths. And further, if the txt file with the filelist is saved in the same folder in which the selected files are kept, then IrfanView is capable to use the selection as file paths to the txt file are added by IrfanView automatically to each filename as soon as the txt file is read by IrfanView. All the filepaths added in this way are the same as they are just the path to the txt file as well as to the selected files. However, if I save the txt file with a filelist to a folder other than that in the selected files are kept, then IrfanView is hopeless as it cannot find files because filepaths added to them by IrfanViewa are the filepath of the txt file rather than of each single file selected.
It is interesting, however, that when I select files from a search result showing files in different folders, the "Save Selection to File" works properly and saves filenames with their various full file paths.
My question: is there a TC function that ALLWAYS allows to save selected files with their full paths. I tried a number of functions offered in the option of Misc > Redefine hotkeys (as I find this feature really handy), but to no avail. Hence, I have no choice, but to ask your kind advice.