Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 03-May-2024 | - | 492 | 230 | ||
Android.bp | D | 03-May-2024 | 2.1 KiB | 70 | 65 | |
COPYRIGHT-RUST.txt | D | 03-May-2024 | 17 KiB | 423 | 339 | |
Cargo.toml | D | 03-May-2024 | 505 | 18 | 13 | |
LICENSE | D | 03-May-2024 | 17 KiB | 423 | 339 | |
METADATA | D | 03-May-2024 | 382 | 20 | 19 | |
MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | |||
OWNERS | D | 03-May-2024 | 47 | 2 | 1 | |
README.md | D | 03-May-2024 | 1.4 KiB | 34 | 21 | |
TEST_MAPPING | D | 03-May-2024 | 294 | 19 | 18 | |
cargo2android.json | D | 03-May-2024 | 161 | 10 | 10 |
README.md
1# CESU-8 encoder/decoder for Rust 2 3[![Build Status](https://travis-ci.org/emk/cesu8-rs.svg)](https://travis-ci.org/emk/cesu8-rs) [![Latest version](https://img.shields.io/crates/v/cesu8.svg)](https://crates.io/crates/cesu8) [![License](https://img.shields.io/crates/l/cesu8.svg)](https://crates.io/crates/cesu8) 4 5[Documentation][apidoc]. 6 7[apidoc]: http://emk.github.io/cesu8-rs/cesu8/index.html 8 9Convert between ordinary UTF-8 and [CESU-8][] encodings. 10 11CESU-8 encodes characters outside the Basic Multilingual Plane as two 12UTF-16 surrogate chacaters, which are then further re-encoded as invalid, 133-byte UTF-8 characters. This means that 4-byte UTF-8 sequences become 146-byte CESU-8 sequences. 15 16**Note that CESU-8 is only intended for internal use within tightly-coupled 17systems, and not for data interchange.** 18 19This encoding is sometimes needed when working with Java, Oracle or MySQL, 20and when trying to store emoji, hieroglyphs, or other characters on the 21Supplementary Multilingual Plane or the Supplementary Ideographic Plane. 22 23[CESU-8]: http://www.unicode.org/reports/tr26/tr26-2.html 24 25## License 26 27Some of this code is adapted from Rust's [`src/libcore/str.rs` file][str.rs]. 28This code is covered by LICENSE-RUST.txt and copyright by The Rust Project 29Developers and individual Rust contributors, as described in that file. 30 31The new code in this project is distributed under the same terms. 32 33[str.rs]: https://github.com/rust-lang/rust/blob/master/src/libcore/str.rs 34