Summary: Talk page for CountGlyphs.
Maintainer: Petko (originally written by Pm)
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


The algorithm considers a "word" to be any sequence of non-whitespace characters, thus Hello.World and !#@#$ are both counted as a single word.

Note also that the number of glyphs reported may be slightly different from a direct count, because of the existence of the {$Glyphs} and {$Words} markups themselves in the page being counted. The {$Glyphs} markup may report an incorrect number of international characters.

PHP5.5 Compatibility Issue

M. Denning, 20170729: Ruleset is throwing the following compatibility error. Please, can this be addressed ASAP? Base site is and WebMaster contact is at the bottom. Thanks!

glyphs  <{$var}  B=>><  ! file: /cookbook/countglyphs.php, line: 24, pat: /{\$Glyphs}/e
words   <{$var}  B=>><  ! file: /cookbook/countglyphs.php, line: 27, pat: /{\$Words}/e
Update: I have updated lines 24 and 27
FROM024: Markup('glyphs', '<{$var}', '/{\\$Glyphs}/e', "'$GlyphToken'.PZZ(\$countglyphs=1)");
TO024: Markup_e('glyphs', '<{$var}', '/{\\$Glyphs}/', "'$GlyphToken'.PZZ(\$countglyphs=1)");
FROM027: Markup('words', '<{$var}', '/{\\$Words}/e', "'$WordsToken'.PZZ(\$countglyphs=1)");
TO027: Markup_e('words', '<{$var}', '/{\\$Words}/', "'$WordsToken'.PZZ(\$countglyphs=1)");
RESULTS:Before change - Letters: 2037 Words: 440
After change - Letters: glyphs Words: words (and 6 hidden characters - see this page in edit mode.)
TakeAway:This seems to have taken away the error generated in Rule Table.
However, the results are not correct at all.
I am holding off on this change until I get an update from the developer.
AfterThought:However, I would still be more comfortable if I obtained positive word from the other developers that this was the only updated necessary.

I've updated the recipe, should work in PHP 5.5 and PHP 7.2. --Petko August 01, 2017, at 02:09 AM

Talk page for the CountGlyphs recipe (users?).