Quote:
Originally Posted by tompe
I am not sure I get it totally. If bit "1" is set is then the last byte in the record always realated to multibyte characters?
|
Almost. It's the *first* trailing entry, which means it immediately follows the text, but may be followed by other trailing entries. If bit 1 is set, plus another bits, you'll have:
Code:
<trailing multibyte bytes><multibyte size & flags><trailing data><size>
Quote:
Originally Posted by tompe
My code now is the following and I wondered if this is a correct understanding of it:
|
My Perl is pretty rusty, but I think mostly... Except instead of needing to preserve the overlap, you actually need to just chop it off -- it appears again at the beginning of the next record.
Quote:
Originally Posted by tompe
Why is three bits used for the size if the maximum size is 3? (I see now that I have reversed the order in $overlap).
|
My error. I did byte & 3 to get the size, and for some reason when I was translating the info into the wiki I turned that into 3 bits. It is only 2 bits (which I have updated the wiki to reflect).