Re: Two questions about HelpViewer

Patrick Cardona <[email protected]>
Newsgroups gmane.comp.lib.gnustep.general
Message-ID <f4bac6a63b1129d0d640238b08c204ce@pi400>
Hi Riccardo,

On 2025-11-11 00:23:05 +0100 Riccardo Mottola 
<[email protected]> wrote:

> Hi,
> 
> since I am working extensively on HelpViewer, it is not easy as that, 
> but 
> thank you for stimulating me looking at the issue more.
> 
> I added character encoding recognition support in HadlerStructureXLP. 
> It will 
> try to parse a like in the form:
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> and assume UTF-8 by default, in XML style. This will need to be 
> documented 
> well.
> 
> Patrick Cardona wrote:
>> It seems finally that writing the meta: <meta charset="utf-8" /> 
>> once at 
>> the very begining of each xlp file is enough to avoid the issue. 
>> Doing 
>> that, the workaround is l
> 
> I have brought the internal Parser up to spec enough that it can 
> display the 
> example files without major errors and with no crashes.
> 
> For testing purposes, you can switch different parsers.
> 
> defaults write org.gnustep.HelpViewer Parser Internal
> defaults write org.gnustep.HelpViewer Parser GSHTML
> defaults write org.gnustep.HelpViewer Parser Sloppy
> 
> built-in parser resuscitated vs. libxml2 based GSHTML parser and 
> GSXML in 
> Sloppy mode.
> 
> 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.
> 
> 
> 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.
> GSHTML assumes Latin 1 if not specified.
> 
> I changed the pipeline to go through UTF-8 if not specified and if 
> specified, 
> to convert to UTF-8. However GSHTML might choke because it either 
> respect the 
> existing character encoding.
> I probably need to remove or even rewrite the encoding line.
> 
> However, in the long run I want to retain the internal Parser which 
> gives us 
> freedom and also allow the use of the mixed XML-HTML style the format 
> is 
> based on.
> 
> You can play around with SVN.
> 
> Riccardo
> 

Thanks a lot for this work. I will try the different parsers options 
and give you feedback asap.

Cheers,
Patrick

-- 
Patrick Cardona - Pi400 - GNU/Linux aarch64 (Debian 13.1)
Xorg (1:7.7+24) - libcairo2 (1.18.4-1+rpt1 arm64)
Window Maker (0.96.0) - GWorkspace (1.1.0 - 02 2025) - Theme: AGNOSTEP 
- MUA: GNUMail (1.4.0)
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.