TotalHLT and file encoding

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
hambaba
Junior Member
Junior Member
Posts: 23
Joined: 2004-01-25, 20:26 UTC

TotalHLT and file encoding

Post by *hambaba »

Hello,

thanks taohe for your TotalHLT plugin. I haven't found a support thread for TotalHLT so maybe you will consider to create one?

I have an issue regarding file encoding. I have to deal with UTF-8 encoded XML-Files with BOM. Unfortunately TotalHLT/Highlight treats them with another encoding.
With Highlight there is the possibility to set the output encoding via the -u command line switch which solves the problem. From the Highlight help:
-u, --encoding=<enc> set output encoding which matches input file encoding; omit encoding info if enc=NONE
Could you please add an option to set the output encoding? Or even better could you add encoding detection like the normal Lister have?
Mr. Ghisler has already provided the author of Synwrite with the detection code. From Synwrite history:
3.0.520
+ UTF-8 content detection (code by C.Ghisler)
Maybe you can borrow the detection code from him too?

Thanks and kind regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If there is a BOM, you don't even need detection code - the BOM makes it already very clear! Otherwise the encoding is usually contained in the xml definition: <?xml version="1.0" encoding="utf-8"?>
Author of Total Commander
https://www.ghisler.com
hambaba
Junior Member
Junior Member
Posts: 23
Joined: 2004-01-25, 20:26 UTC

Post by *hambaba »

@ghisler

Thx for clarifing.
You are right usually the encoding is included in the xml declaration but the xml declaration is optional http://www.w3.org/TR/xml/#sec-prolog-dtd
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Why do u use TotalHLT? i'm curious, it's very poor of features.
hambaba
Junior Member
Junior Member
Posts: 23
Joined: 2004-01-25, 20:26 UTC

Post by *hambaba »

There is no particular reason.
I need a viewer with syntax highlighting. Unfortunately your SynWriteX64 is not up2date with your awesome x86 version.
But after reading your comment it occurred to me again that there is also your UniversalViewer. Maybe i should try it.
Thx for your comment
Axe1
Junior Member
Junior Member
Posts: 25
Joined: 2006-08-21, 19:47 UTC

Post by *Axe1 »

I would like Mr. taohe to continue his work on TotalHLT. A few things need to be fixed:
1. UTF BOM support, as Mr. hambaba described above.
2. An option to disable smooth scrolling (its current implementation is not useful).
3. Code coping (via ctrl+c) should not include line numbers.
4. Highlight library being used seems to be outdated and contains bugs.

I use TotalHLT because I need light and fast code highlighting plugin. And all of the alternatives are very heavy.
Post Reply