[SOLVED] Use UTF-8 with byte-order mark when creating a new .txt file
Moderators: white, Hacker, petermad, Stefan2
Re: Use UTF-8 with byte-order mark when creating a new .txt file
2tuska
nice decision! and it's doable)) and looks workable)))
nice decision! and it's doable)) and looks workable)))
#146217 personal license
Re: Use UTF-8 with byte-order mark when creating a new .txt file
That's not my suggestion.
I don't see why you need this.
When I store an anyname.txt template file with your wanted encoding,
there is no problem with the simple Shift-F4 definition
cm_edit /CT
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
Re: Use UTF-8 with byte-order mark when creating a new .txt file
2tuska
If you use cm_edit /CT the template file has to be located in Windows' default template directory - usually %APPDATA%\Microsoft\Windows\Templates = %$Templates%
Some sources say the Windows' templates directory is in APPDATA%\Microsoft\Templates so I guess the best way to find the dir is by using cd %$Templates%
There is also a Junction (LNK) to the Templates folder in %USERPROFILE% but it will have a localized name (Skabeloner in Danish).
If you use cm_edit /CT the template file has to be located in Windows' default template directory - usually %APPDATA%\Microsoft\Windows\Templates = %$Templates%
Some sources say the Windows' templates directory is in APPDATA%\Microsoft\Templates so I guess the best way to find the dir is by using cd %$Templates%
There is also a Junction (LNK) to the Templates folder in %USERPROFILE% but it will have a localized name (Skabeloner in Danish).
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Use UTF-8 with byte-order mark when creating a new .txt file
I made a link Templates to the Microsoft templates under the TC home dir.petermad wrote: ↑2024-02-08, 12:41 UTC 2tuska
If you use cm_edit /CT the template file has to be located in Windows' default template directory - usually %APPDATA%\Microsoft\Windows\Templates = %$Templates%
Some sources say the Windows' templates directory is in APPDATA%\Microsoft\Templates so I guess the best way to find the dir is by using cd %$Templates%
There is also a Junction (LNK) to the Templates folder in %USERPROFILE% but it will have a localized name (Skabeloner in Danish).
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
Re: Use UTF-8 with byte-order mark when creating a new .txt file
2petermad
Windows' default template directory - %$Templates% was the solution!
Many thanks for your support!
2Horst.Epp
as I have never stored a template in this directory.
Now that I know the/your solution, I can say: Of course you can also solve the issue this way
Thanks!
cd %$Templates% - C:\Users\user\AppData\Roaming\Microsoft\Windows\Templates\
usercmd.ini
wincmd.ini
Windows' default template directory - %$Templates% was the solution!
Many thanks for your support!
2Horst.Epp
I have unfortunately overlooked the note in the help: "By default, the user's template directory will be used.",
as I have never stored a template in this directory.
Now that I know the/your solution, I can say: Of course you can also solve the issue this way
Thanks!
cd %$Templates% - C:\Users\user\AppData\Roaming\Microsoft\Windows\Templates\
Code: Select all
C:\Users\user\AppData\Roaming\Microsoft\Windows\Templates\UTF-8-BOM.txt
C:\Users\user\AppData\Roaming\Microsoft\Windows\Templates\z_UTF-16LE with Signature.txt
Code: Select all
[em_UTF-8-BOM_Shift-F4_%$Templates%_cm_edit_CT]
button=
cmd=cm_edit
param=/CT
menu=cm_edit /CT || cd %$Templates%|https://www.ghisler.ch/board/viewtopic.php?p=449648#p449648|https://www.ghisler.ch/board/viewtopic.php?p=449747#p449747 Use UTF-8 with byte-order mark when creating a new .txt file
Code: Select all
[Shortcuts]
S+F4=em_UTF-8-BOM_Shift-F4_%$Templates%_cm_edit_CT
;S+F4=em_UTF-8-BOM_Shift-F4_%$Templates%_cm_edit_CT https://www.ghisler.ch/board/viewtopic.php?p=449747#p449747 petermad: If you use cm_edit /CT the template file has to be located in Windows' default template directory - usually %APPDATA%\Microsoft\Windows\Templates = %$Templates%
Re: Use UTF-8 with byte-order mark when creating a new .txt file
For me, the issue is solved.
Thanks again for your support.
@Moderator
Please add [SOLVED] in the first post (I am not allowed to do that in this case).
Perhaps this post should be moved to the "Total Commander (English)" forum?
Thanks again for your support.
@Moderator
Please add [SOLVED] in the first post (I am not allowed to do that in this case).
Perhaps this post should be moved to the "Total Commander (English)" forum?
Re: Use UTF-8 with byte-order mark when creating a new .txt file
You can edit the post making the moderator message no longer relevant and remove the moderator message.
Moderator message from: white » 2024-02-12, 16:32 UTC
Done.tuska wrote: ↑2024-02-12, 15:38 UTC Perhaps this post should be moved to the "Total Commander (English)" forum?