Lister - add custom character encoding, like ISO8859-2

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

Lister - add custom character encoding, like ISO8859-2

Post by *krapet »

Current possibility to display text by Lister are:
  • (A) ansi-windows
    (S) ASCII-DOS
    (V) variable char width
    (6) Unicode
    (7) UTF-8
There is no way to display other encoding correctly like ISO-8859-2

It will be fine when change of encoding affects also different view modes e.g. text only, binary, HEX, HTML.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You can show other encodings by choosing a different font, e.g. for 'v' (variable width) font view.
Author of Total Commander
https://www.ghisler.com
krapet
Junior Member
Junior Member
Posts: 21
Joined: 2007-08-02, 06:39 UTC
Location: Czech

Post by *krapet »

Unfortunately it is not possible. I'm not able to select character coding, I can choose only character group for region (Western, Central European, Arabic, Greek, ...)

Generally, for "Central Europe" can be used at least four code pages: IBM-852, MacCE, Windows-1250 and ISO-8859-2 plus two universal UTF-8 and UNICODE.

Simultaneously, all file-types can be stored in different character encoding.

In Lister menu are mixed two different things: file-type (1,2,3,4,5) and character encoding (6,7,A,S,V).

I would like to be able to see every file-type (Text only, Binary, HEX, HTML)
in selected character encoding (IBM-852, MacCE, Windows-1250, ISO-8859-2, ...)
like for example in FireFox.
Dark-Star
Junior Member
Junior Member
Posts: 76
Joined: 2004-12-01, 14:15 UTC
Location: Reutlingen, GERMANY

Post by *Dark-Star »

I already requested that feature in the german section of the board some time ago: link

For me, selecting a custom font is not possible either (and even if it was, it's very awkward to go to options, change the font, view a file, then change the font back, if all I want to do is view a single file...)

There's a difference between the "charset" (i.e. what you select in the "font" dialog: central europe, cyrillic, ...) and the "encoding" (i.e. how the special characters are represented in bits and bytes).

I'm often working with files encoded in SJIS, EUC-JP and GB2312 for example. A feature to convert those to unicode "on the fly" (for example by using libiconv) would be very appreciated.
#40099 50-user license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately such a change doesn't fit into the current implementation of lister, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Dark-Star
You may try the View64, codepages are implemented there.
SirZooro
Junior Member
Junior Member
Posts: 8
Joined: 2006-11-03, 09:45 UTC

Post by *SirZooro »

I think that TC should allow to choose both character encoding and font used for displaying (variable or fixed width). For encoding support you can use libiconv library (GNU license).
Dark-Star
Junior Member
Junior Member
Posts: 76
Joined: 2004-12-01, 14:15 UTC
Location: Reutlingen, GERMANY

Post by *Dark-Star »

As long as iconv is LGPL and not GPL, it should be okay to use in TC.

However, since that feature would only need a 1-way mapping from (any codepage)->Unicode/UCS, there is a simpler solution: One would simply need to create such a mapping table for each supported codepage. ISO-8859-X would be very easy to implement, and at least Shift_JIS and EUC-JP wouldn't be that hard either.

With that, there would be no need to add a dependency on a custom library (which I know is something that the author often wants to avoid ;-))
#40099 50-user license
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Support for mult encodings will be added to Lister alternative (see signature).
I will not use libiconv, however, I'll use OS functions for that: all needed encodings are implemented there under WinXP+.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's not that simple. There are many many other locations where the encoding is important:
- search function
- highlighting of text
- printing
- copy to clipboard
Author of Total Commander
https://www.ghisler.com
Post Reply