Lister: several keypresses of "5" on UTF-8 HTMs

Bug reports will be moved here when the described bug has been fixed

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: several keypresses of "5" on UTF-8 HTMs

Post by *DrShark »

Since this wasn't caused by plugin, I decided to split it to separate bugreport. It can also can be considered as a suggestion since behaviour described here is not documented in Help file (indeed extended version of this suggestion I've already posted here).
So, selected and slightly edited quotes from this post:
post wrote:test without plugins intalled (default wincmd.ini settings):
1) sample file (inside archive) http://rghost.ru/66zvmdCsC:
* F3 shows file with "HTML text (Strip tags)" and "UTF-8" checked.
* F3+5+5: "HTML text (Strip tags)" and "UTF-8" checked.
2) another file (inside archive; download password: utf8htm2): http://rghost.ru/7qs27Nyq6
* F3: just "HTML text (Strip tags)" checked.
* F3+5+5: still just "HTML text (Strip tags)" checked.
In other words, for some htm files insde "HTML text (Strip tags)" view Lister will change encoding from UTF-8 to ANSI by pressing "5" key, then again to UTF-8 via next "5" keypress and so on - this is right behaviour IMHO. And for some files "5" keypress won't change encoding inside "HTML text (Strip tags)" view - I see it as wrong behaviour. Both files in example are UTF-8, so switching to UTF-8 rendering should be possible for both, and it is supported for both if we'll use F3+5+7 instead of F3+5+5 in reproduce steps.

The only notable difference between both HTM files I can see is that second one has a BOM in UTF-8 (at least Akelpad can detect it there). If behaviour for both files is by design and switching to ANSI for htm files inside "HTML text (Strip tags)" view intentionally allowed only for files with byte order mark, it must be documented, since it is not expected: Lister allows to switch bitween ANSI and UTF-8 for UTF-8 *.txt files with and without BOM.

edit: fixed note about BOM because akelpad shows "*BOM" status for files without BOM.
Last edited by DrShark on 2015-11-26, 10:40 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I cannot download the second file, it requests a password.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Password was added by mistake, sorry. Password:
utf8htm2
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

See my other reply regading invalid UTF-8 header.
Author of Total Commander
https://www.ghisler.com
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 TC 9.00a switching between "HTML text (strip tags)"+"UTF-8" and "UTF8" view using 5 key in Lister works for sample file that had this issue in TC 8.52a, so the issue is fixed.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply