View Single Post
Old 05-29-2024, 09:48 AM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,871
Karma: 6120478
Join Date: Nov 2009
Device: many
And as for using \x followed by 2 hex chars in the replacement, according to the code that should work, see:

https://github.com/Sigil-Ebook/Sigil...extBuilder.cpp

So any byte sequence can be made by a string of \xHH where H is a hex character (0-9,a-f,A-F).

If need be we can add support for longer hex specified chars to that code by supporting braces { and } so that would work as well.

Is support of using \x{abcd} format in replacements desired or can people live with just \xab\xcd which should be supported now according to the ReplacementBuilder code.

Update: \xab\xcd actually does *not* work, instead of combining the two consecutive byte values into an unsigned int16 they promote them both separately to two different u16 byte values. I will add support for replacement using \x{hhhhhhhh} to a sequence of uint16 values.

Last edited by KevinH; 05-29-2024 at 12:24 PM.
KevinH is online now   Reply With Quote