Lister: HTML (strip tags) view: switch UTF8 or Unicode

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Lister: HTML (strip tags) view: switch UTF8 or Unicode

Post by *DrShark »

Reason: often by default cyrillic text is rendered incorrect in Lister's HTML (strip tags) view. Rendering it in UTF-8 mode or Unicode mode in most cases could fixit, but..
Lister itself has separate modes for UTF8 or Unicode, however it misses ability to use them inside HTML (strip tags) view in which Lister makes basic rendering of HTML document. Lister has active Encoding menu in HTML view,
but as far as I understand UTF8 or Unicode technically are not encodings, so they are not available there. If this is correct, UTF-8 and Unicode may be added to "HTML (strip tags)" menu as submenus, or as additional menu near "Encoding".
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can try adding special encoding 65001 via Encodings menu which means UTF-8.
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

MVV
Thanks, for UTF-8 it works, so no new menu needed for this, but it worth to add a hint into Total Commander Help file as an example to "Lister: Encoding menu:" page.

And is there any solution for UTF-16?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Perhaps adding UTF-8 to predefined list of encodings would be nice.

Unfortunately there is no codepage number for UTF-16.
Do you need to deal with UTF-16 HTMLs often? Since UTF-16 files are not text files but binary, I don't think that UTF-16 is good for HTML/XML...
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

MVV wrote:Do you need to deal with UTF-16 HTMLs often
Not often, but I can't also to say "rare", since there is a high chance to get them on asian-language websites (such sites often offer cyrillic-based language pages too). And in most cases I really don't want to use IEView for saved web pages on Vista with IE9 inslalled, because IE9 on Vista even with all tweaks to get it work quickly, and disabled extensions, is deadly slow, here the problem is certainly in IE engine.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

In this topic nice Lister features mentioned:
1. pressing "5" and then "7" key or selecting "HTML text (Strip tags)" and then "UTF-8" menu will change rendering to UTF-8 when file already opened in "HTML text (Strip tags)" view and UTF-8 in HTML wasn't detected by Lister.
2. pressing "5" key or selecting "HTML text (Strip tags)" several times will change rendering encoding between ANSI and UTF-8 in "HTML text (Strip tags)" view (although for me this currently doesn't work for all files). It would be nice this way to switch also to UTF-16 and custom encoding (one from "Encodings" menu).
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply