Re: Two questions about HelpViewer

Yavor Doganov <[email protected]>
Newsgroups gmane.comp.lib.gnustep.general
Organization The GNU Emacs Church (Bulgarian Eparchy)
Message-ID <87tsyzw96l.GNU'[email protected]>
Patrick Cardona wrote:
> On 2025-11-11 00:23:05 +0100 Riccardo Mottola
> <[email protected]> wrote:
> > Since we are not pure XML nor HTML the results are interesting,
> > however the Internal parser seems now quite usable with some care in
> > writing the xlp.

Humans writing XML or XML-alike language directly should always do
that with utmost care.  I find writing XML very unpleasant, but YMMV.
Ditto wrt reading.

> > The issue is that the whole chain may not be UTF-8 clean and that
> > the XML parser is called twice, first from HandlerStructureXLP then
> > from TextFormatterXLP.

You could simply not handle this case and declare such documents
invalid/broken with the proper error message.

> > GSHTML assumes Latin 1 if not specified.

That's a poor default these days.

> I confirm the best choice is the internal Parser.

Likewise.

> tests:
> Removing previously all the <meta charset="utf-8" /> in all the .xlp
> files.

Worth noting that if these are retained HelpViewer from SVN trunk
displays nothing.

> 1) without changing defaults

> So No Parser set?

The default is Internal if it's not set.

> All seems correct (accented characters in titles and texts, in legends)

Confirmed.

> 2) Parser Internal set

That's the same as above.

> 3) Parser GSHTML set

> Accented characters were badly rendered.

Same for me.

> 4) Parser Sloppy

> Accented characters well interpreted.
> Some unexpected double quotes after some titles.

Not only quotes but opening tags as well, plus missing text, like:

Tags Disponibles
# The entire paragpraph after the title is not displayed, just this:
'<b> :

<b>votre texte en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.