24 releases (breaking)
0.19.1 | Jun 29, 2023 |
---|---|
0.18.0 | Jun 12, 2023 |
0.17.0 | Mar 7, 2023 |
0.16.0 | Nov 27, 2022 |
0.4.0 | Mar 2, 2021 |
#339 in Text processing
91 downloads per month
Used in 4 crates
58KB
1.5K
SLoC
utf8-io
defines several utilities for performing UTF-8 I/O.
-
ReadStr
andWriteStr
are traits which extendRead
andWrite
providingread_str
andwrite_str
functions for reading and writing UTF-8 data. -
Utf8Reader
andUtf8Writer
implementReadStr
andWriteStr
and wrap arbitraryRead
andWrite
implementations.Utf8Reader
translates invalid UTF-8 encodings into replacements (U+FFFD), whileUtf8Writer
reports errors on invalid UTF-8 encodings. Both ensure that scalar values are never split at the end of a buffer. -
Utf8Duplexer
represents an interactive stream and implements bothReadStr
andWriteStr
.
Similar crates
Utf8Reader
is similar utf8-read
, but differs in that it silently turns
invalid byte sequences into replacement characters rather than reporting an
error.
Dependencies
~0.2–8.5MB
~85K SLoC