#unicode #surrogate #encoding

wtf8

Implementation of the WTF-8 encoding. https://simonsapin.github.io/wtf-8/

4 releases

Uses old Rust 2015

0.1.0 Apr 20, 2021
0.0.3 Aug 10, 2016
0.0.2 Nov 14, 2014
0.0.1 Nov 14, 2014

#1416 in Text processing

Download history 1452/week @ 2024-07-24 1534/week @ 2024-07-31 1313/week @ 2024-08-07 1061/week @ 2024-08-14 1704/week @ 2024-08-21 1446/week @ 2024-08-28 1890/week @ 2024-09-04 1503/week @ 2024-09-11 1314/week @ 2024-09-18 1706/week @ 2024-09-25 2238/week @ 2024-10-02 2583/week @ 2024-10-09 2078/week @ 2024-10-16 2253/week @ 2024-10-23 1851/week @ 2024-10-30 1511/week @ 2024-11-06

8,102 downloads per month
Used in 23 crates (4 directly)

MIT license

46KB
950 lines

rust-wtf8

Implementation of the WTF-8 encoding. Depends on the standard library’s alloc crate but not std.

Documentation


lib.rs:

Implementation of the WTF-8 encoding.

This library uses Rust’s type system to maintain well-formedness, like the String and &str types do for UTF-8.

Since WTF-8 must not be used for interchange, this library deliberately does not provide access to the underlying bytes of WTF-8 strings, nor can it decode WTF-8 from arbitrary bytes. WTF-8 strings can be obtained from UTF-8, UTF-16, or code points.

No runtime deps