Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-13-2026, 11:13 AM   #31
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Did you read my explanation, that would require linking Sigil with the ICU lib which would necessitate adding 31meg of code and data to an already huge Sigil app or hugely slow down editing by calling into the python interpreter after every single keystroke.

If there was a just a limited set of character names that everyone was interested in seeing that would be different.

So this suggestion "as made" is not gonna happen.

The closest approximation I could get would be a button, icon, or menu that a user would need to trigger to display the character name someplace like the status bar. But this would be done only on user request and not automatically after every keystroke in the editor as it would require calling into the python interpreter.

So maybe a new menu item: "Inspect Character" that would report the name of the character?

Slower and requiring user interaction but doable without the huge file size penalty or loss of editing speed.

Any interest in that?

Last edited by KevinH; 01-13-2026 at 12:56 PM.
KevinH is online now   Reply With Quote
Old 01-13-2026, 01:12 PM   #32
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by un_pogaz View Post
That's a shame, but I understand.
I encourage you to see what the Calibre Editor do to highlight a xhtml error, wich is what I except. I also understand that such error highlight could be not fully accurate in every case, but 90% is already a lot.

But just a proposal in a suggestions thread.
Which I just now tried. Try the following testcase:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Calibre Quick Start Guide</title>
  <link href="../styles/stylesheet.css" rel="stylesheet" type="text/css"/>
</head>

<body>
  <h1 class="center" id="introduction">Introduction</h1>

  <p class='><a href="https://calibre-ebook.com/">Calibre</a> is an <a href="https://www.opensource.org/">open source</a> e-book management tool. Simply put, calibre allows you to organize your e-book library, convert e-books to various formats, and interact with your e-book reader, all in an intuitive and friendly manner. It is compatible with Microsoft Windows 8 onwards – as well as Apple’s macOS (and various flavors of Linux). It was created by Kovid Goyal, who still leads its development. A number of people around the world, including myself, contribute to calibre’s development. Throughout this guide and the online docs you will see ‘calibre’ instead of ‘Calibre’. That’s the convention Kovid chose, so that’s what we use.</p

  <p>The purpose of calibre is to simplify management of your e-book library. It does this in several ways:</p>
</body>
</html>
Note there are two errors both of omission. One is the first p tag has an unclosed quote on a missing class name. The second is that its matching end tag is missing its final ">" char.

Now, there is no syntax highlighting for either being presented to me by calibre. There is nothing to indicate the errors in the syntax highlighting. Is there a preferences or setting I must change to enable it?

Next if I run Check Book, it only detects the first error and if I let it autofix, then it ends up removing the entire paragraph!

Instead in Sigil:

if you run the same test on the same xhtml and run the Well Formed check the error message says:

Code:
OEBPS/Text/Section0001.xhtml    11      N/A     Attribute "class" has unmatched quotes on attribute value.  near column 2
And of course in Sigil the immediate error message shown in Preview is:

This page contains the following errors:
error on line 11 at column 14: Unescaped '<' not allowed in attributes values
error on line 13 at column 3: Unescaped '<' not allowed in attributes values
error on line 14 at column 1: Unescaped '<' not allowed in attributes values
error on line 15 at column 8: AttValue: ' expected
Below is a rendering of the page up to the first error.


So I am not sure how the calibre Editor is making things any easier or doing the requested syntax highlighting of error locations.

What am I missing?

Last edited by KevinH; 01-13-2026 at 07:15 PM.
KevinH is online now   Reply With Quote
Advert
Old 01-13-2026, 05:15 PM   #33
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
As a test, I can have implemented the show character name request in a quick and dirty manner and can actually call into the python interpreter and use unicodedata to get a non-control characters name.

Since every key you type in CodeEditor will change cursor positions, you would have to make this call into the python library once for every single key typed!

It is doable on a fast machine with a slow typist, but I shudder to think what this would do for a fast typer on an old machine.

I will try adding a timer and only on timeout adding in the character name. So a user would have to pause their typing briefly so that the timeout fires and the latest character name has time to appear. But trying to read that status bar when constantly typing doesn't really work anyway.

This would necessitate creating a separate name label in the status bar and making a MainWindow member variable to hold the result of the timer firing.

I will keep playing around with this to workaround the slower bridge speed to launch python calls or by limiting the timing and number of calls to keep editing with the keyboard fast.

Last edited by KevinH; 01-13-2026 at 05:20 PM.
KevinH is online now   Reply With Quote
Old 01-13-2026, 09:57 PM   #34
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 823
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Quote:
Originally Posted by KevinH View Post
The closest approximation I could get would be a button, icon, or menu that a user would need to trigger to display the character name someplace like the status bar. But this would be done only on user request and not automatically after every keystroke in the editor as it would require calling into the python interpreter.

So maybe a new menu item: "Inspect Character" that would report the name of the character?

Slower and requiring user interaction but doable without the huge file size penalty or loss of editing speed.

Any interest in that?
Yes, thank you, that would work for me. I have no need to see each character named as I am typing. I use Sigil to edit epubs, but when I have a question about a specific character, I either have to copy and paste it into a browser so that I can google it, or I have to open the epub in Calibre, find the correct spot, position the cursor, etc. It would be much more convenient if I could simply ask Sigil what character it is. I wouldn't want it to be active while I am typing. Thanks for considering it.
icallaci is offline   Reply With Quote
Old 01-14-2026, 10:57 AM   #35
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 460
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
I too like the idea of a way to inspect a character when needed. I work with some quite old files sometimes, or multilingual documents, and this would be very handy.
retiredbiker is offline   Reply With Quote
Advert
Old 01-14-2026, 11:04 AM   #36
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Do people care if it is the character immediately before the cursor or immediately after the cursor? The latter option matches where the cursor position actually indicates.
KevinH is online now   Reply With Quote
Old 01-14-2026, 12:44 PM   #37
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 823
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Quote:
Originally Posted by KevinH View Post
Do people care if it is the character immediately before the cursor or immediately after the cursor? The latter option matches where the cursor position actually indicates.
I personally don't care if the cursor is before or after the character. In calibre, the cursor is immediately after the character in question, but I can live with either one.
icallaci is offline   Reply With Quote
Old 01-14-2026, 01:53 PM   #38
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 928
Karma: 3501168
Join Date: Jan 2017
Location: Poland
Device: Various
Definitely the character immediately before the cursor.
BeckyEbook is offline   Reply With Quote
Old 01-14-2026, 02:09 PM   #39
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Okay, I built a singleton instance that builds its own codepoint name cache using python before the MainWindow is launched. This allows the codepoint name process to get fast enough to show the character name for every key typed.

It updates as it goes along.

So I will add that to Sigil so that users who build their own can report back about it.

I hope to push these changes to master by tonight.
KevinH is online now   Reply With Quote
Old 01-14-2026, 02:14 PM   #40
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
Definitely the character immediately before the cursor.
Why? Could you provide an argument for that "before" being better than "after" that doesn't include "just to match calibre".

If you want before the cursor, then what do you return when the cursor is at the very start of the line then?

When at the end of the line there is always the new line char if you go with the character after the cursor.

Before the cursor just seems strange to me.

Last edited by KevinH; 01-14-2026 at 03:43 PM.
KevinH is online now   Reply With Quote
Old 01-14-2026, 02:42 PM   #41
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,032
Karma: 210162574
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
RTL languages would be the only thing I can think of that would make "before the cursor" make any sense. But that would be the exception rather than the rule I would think. I too see no real sense in what's going on behind the cursor. *shrug*

Last edited by DiapDealer; 01-14-2026 at 03:47 PM.
DiapDealer is offline   Reply With Quote
Old 01-14-2026, 03:38 PM   #42
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
And to add to the "after insertion point cursor" argument, if you convert to a block cursor, the flashing character under the block cursor is the one after the insertion point cursor, not before it. So the character "under the cursor" is technically the one after the insertion point cursor.

Last edited by KevinH; 01-14-2026 at 06:02 PM.
KevinH is online now   Reply With Quote
Old 01-14-2026, 06:22 PM   #43
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 928
Karma: 3501168
Join Date: Jan 2017
Location: Poland
Device: Various
You're right, I wrote the exact opposite of what I wanted to say. When we place the cursor in the text, it will be obvious that the information is about the NEXT character.
BeckyEbook is offline   Reply With Quote
Old 01-14-2026, 08:35 PM   #44
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Whew! Glad we all agree!
I will push those changes to master tomorrow morning for people to play around with and suggest changes to.
KevinH is online now   Reply With Quote
Old 01-15-2026, 12:52 PM   #45
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,246
Karma: 6565382
Join Date: Nov 2009
Device: many
Okay, I have pushed the latest version of "displaying a character name" requested feature to master.

It uses a cache for each codepoint to store its name and python routines to use unicodedata.name() to lookup codepoints not yet in the cache. The cache is preloaded with the names of the standard ascii characters heavily used in css and xhtml. This helps speed up editing.

If anyone builds there own, I am looking for feedback on this feature request:

1. Do you notice any editing slowdown related to this change? Editing speed may especially be an issue for editing text in a language that does not make heavy use of standard ascii characters (that xhtml and css uses) in its text (due to pre-caching). So if you can test that and report back, that would be helpful.

2. Instead of displaying it after each every cursor change, would you instead prefer an "Inspect Character" menu item and removal of this status bar addition?

Note: Master also includes:

1) a fix for a python name collision in the SigilMatch that impacts Python Function Replace

2) the addition of a way to export selected rows of the SpellcheckEditor to a CSV file (using a right click pop-up menu)

Feedback on either of those two changes also welcome.

Last edited by KevinH; 01-15-2026 at 12:57 PM.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions for Sigil Improvements or New Features KevinH Sigil 168 11-18-2025 01:23 PM
Suggestions for New Plugins and Plugin Improvements KevinH Plugins 0 09-22-2025 11:53 AM
Ideas for New Improvements or Features KevinH Sigil 97 04-09-2025 10:45 AM
Improvements/bugs/features dontcrash KOReader 10 10-23-2019 11:05 AM
Onyx M92: Suggestions for possible improvements Lode Onyx Boox 3 02-11-2013 08:40 AM


All times are GMT -4. The time now is 01:46 PM.


MobileRead.com is a privately owned, operated and funded community.