Commit Graph
9 Commits
Author SHA1 Message Date
pantonshire 9d6eae0bd0 make lib no-std compatible 2023-06-05 14:46:39 +01:00
pantonshire effe6916d3 move unicode_data_encoded.gz to lib 2023-06-05 11:12:48 +01:00
pantonshire c274ba6f01 🐛 only show consumed bad bytes for invalid characters
Previously, the bytes displayed for invalid characters included bytes
from the byte stream that were peeked rather than consumed. This
resulted in certain bytes being displayed multiple times, since the
peeked byte could appear in the following character.

For example, `printf '\xce\x61' | utfdump_bin` would result in the byte
0xce being displayed twice, once at the end of the invalid character and
once as the valid character `a`.

This patch modifies `utfdump::utf8::Utf8Error` so it also stores the
number of consumed bad bytes, enabling the binary to output only the
consumed bad bytes.
2023-06-05 11:06:28 +01:00
pantonshire f9430db2f9 update binary to use new lib 2023-06-05 10:25:08 +01:00
pantonshire 25dae48064 refactoring 2023-06-04 18:18:08 +01:00
pantonshire a3750b5732 working rust decoder for new encoded data format 2023-06-04 18:12:30 +01:00
pantonshire dc4650262d packed struct for character data 2023-06-03 21:35:55 +01:00
pantonshire 24abc7ed79 work on rust side of new encoded data format 2023-06-02 20:50:47 +01:00
pantonshire ef6765e037 ♻️ refactoring 2023-05-19 09:29:37 +01:00