[sword-devel] MODTOOLS-17 To osis2mod, added conversion of hex and decimal numeric entities to UTF-8, with special handling of <, >, &, ', and ".

Greg Hellings greg.hellings at gmail.com
Wed Aug 6 21:30:31 EDT 2025


Binary Windows builds with your commit up:
https://src.thehellings.com/greg/mingw-sword-build/-/releases

Apologies I still haven't been able to produce a native Windows on Arm
build. The toolchain is still lagging behind the x86 version of the
toolkit, and producing some build errors that need to be addressed upstream.

--Greg

On Wed, Aug 6, 2025 at 4:20 PM DM Smith <dmsmith at crosswire.org> wrote:

> I’ve just checked in a change for osis2mod.
>
> MODTOOLS-17 To osis2mod, added conversion of hex and decimal numeric
> entities to UTF-8, with special handling of <, >, &, ', and ".
>
> Also:
>  * Fixed a bug in hex numeric entities which defined &xHHHH; rather than
> &#xHHHH;.
>  * Added entity sanity check of maximum length of 32.
>  * Refactored entity handling into handleEntities and comment handling
> into handleComments.
>  * Changed t_entitytype and t_commentstate into class enums EntityType and
> CommentState.
>  * Added -d 1024 for entity and comment parsing.
>
> Note: The coding allows for 0 padding of the numeric entities.
> Note: The 5 need to be treated specially.
>         & or &#x26; → &
>         < or &#x3C; → <
>         > or &#x3E; → >
>         " or &#x22; → " or "
>         ' or &#x27; → ' or '
> When converted to these forms, " should be transformed into " except
> in attributes using " and likewise ' into ' except in attributes
> having ‘.
>
> I need to update the wiki to match.
>
> In Him,
>         DM Smith
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20250806/5072e6b4/attachment.htm>


More information about the sword-devel mailing list