Lister and UTF-8 option

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister and UTF-8 option

Post by *petermad »

2tommy0910
You can also instead do it via configuring Lister's "Define view method by file type" and set the value for *.txt files to 7:

See: https://madsenworld.dk/tcmd/listertextasutf8.png

.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
shula
Junior Member
Junior Member
Posts: 8
Joined: 2009-06-12, 07:30 UTC

Now, how to quick-view HTML + UTF8 --- together?

Post by *shula »

As per Petermads suggestion, "Define view method by file type",
I can now see UTF-8 files by default,

but now HTML files aren't being formatted as Text ("strip tags" view option = 5 )
"<body><p>hello <b>world</b></p>" -> "hello world"

What I tried:
  • strip HTML tags, codepage=UTF-8:

    Code: Select all

    %COMMANDER_EXE% /S=L:C65001T5
  • setting both UTF-8 and HTML at the same time:

    Code: Select all

    %COMMANDER_EXE% /S=L:T7T5
here:
Image: https://pasteboard.co/L8qhu65ai1Ey.png

undesired example: UTF8=yes, HTML=No.
Image: https://pasteboard.co/wla4PjY2EYlb.png

is that possible internally?
or with a plugin?
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister and UTF-8 option

Post by *petermad »

You cannot put %COMMANDER_EXE% or other programs in for the plugin, you can only use what is available when you click the [+] button in the dialog where it says: "Please choose default view modes" see upper right corner of the screenshot: https://madsenworld.dk/tcmd/listertextasutf8.png

So instead of %COMMANDER_EXE% /S=L:T7T5 you should put in:

Code: Select all

5,7
in that dialog box. Then pressing F3 on a .htm* file will open it in mode 5 (HTML text (strip tags)) - if you press 4 it will shift to mode 7 (UTF-8)

If the .html file has the proper meta tag:

Code: Select all

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
Then TC will automatically show mode 5 as UTF-8 - it is not enough that the file has BOM, the meta tag has to be in the html file.

While in mode 5 you can force UTF-8 by pressing 7.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply