[pmwiki-users] UTF-8 & not (in summary lines)

Patrick R. Michaud pmichaud at pobox.com
Thu Aug 10 16:33:09 CDT 2006

On Thu, Aug 10, 2006 at 04:30:59PM -0400, Donald Z. Osborn wrote:
>    Generally I am pleased with the way PmWiki handles extended latin
>    characters.
>    I pushed the matter to see, by putting a short text with extended
>    characters (not the codes) in the "Summary" line before saving an edit and
>    then noted that in Recent changes, it showed the decimal codes for those
>    characters. Then I discovered that the Summary lines are always printed
>    within [= =] . Hence:
>    * [[PanAfrLoc/Manding]]  . . . 2006-08-10  07:37 by [[~Don Osborn]]: [=Ref
>    to Farikoloɲɛnajɛ daɲɛgafe=]
>    ... and the summary line is unreadable for most of us...

Ick, you're right.  I don't have a good solution for this one.

>    Is there a reason for [= =] being inserted? If I wanted to, could this
>    default be undone?

The [=...=] is inserted so that wikiwords, links, and other markups
aren't interpreted in the summary lines (it can make things look funny
in the RecentChanges and page histories).

Yes, it can be undone by simply changing the $RecentChangesFmt settings:

$RecentChangesFmt = array(
  '$SiteGroup.AllRecentChanges' =>
    '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: $ChangeSummary',
  '$Group.RecentChanges' =>
    '* [[{$Group}/{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: $ChangeSummary');

>    Next question: Something is treating these extended characters differently
>    than the ASCII ones (or else [= =] wouldn't single them out for rendering
>    as code. Any ideas on how to solve that (not even sure at what level
>    they're being interpreted this way)?

It's not that [=...=] singles them out, it's that it prevents them
from being treated as markup, as it is supposed to.  

HTML normally requires that ampersands be encoded in the output as
"&", so PmWiki converts any ampersands to "&" before it
starts processing markup.  (There are security reasons for doing this,
also.)  However, there's also a markup rule defined that finds things
of the form "&#ddd;" and converts them back to "&#ddd;",
so that a browser can display it properly.  Of course, any [=...=]
prevents the markup rule from being applied, so that if someone
enters "[=&#ddd;=]" the end result is indeed displayed as an 
ampersand, a number, and a semicolon.


More information about the pmwiki-users mailing list