View Single Post
Old 11-15-2023, 02:52 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,486
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Using this text:
Code:
<div>
<p>Prevod: ˇivković Mirjana; Naslov originala: Anderson Poul THREE HEARTS AND THREE LIONS, 1961.</p>
<p>Prevod: ˇivković Mirjana; Naslov originala: Anderson Poul THREE HEARTS AND THREE LIONS, 1961.</p></div>
and using the template {comments:strlen()}, I get 213 characters.

If I manually count the displayed characters I also get 213, the same as the template. Don't forget that the end of line is a character.

Loading that text into Notepad++, a text editor, I get 217 characters. The difference between Notepad++ and the template is that Notepad is counting the components (bytes) of composed characters, for example ˇ and ć, as two characters (bytes). There are 4 such characters in the string, making the length 4 longer: 217 instead of 213.

I have no idea where the 188 comes from. Nor do I know where the "online tool" gets 211.

In any event, the output of the template is the best count your going to get from calibre.
chaley is offline   Reply With Quote