commit | 3602e50d2b88f894ab7539eafa17497f2be852bb | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Mon Aug 30 07:37:18 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Aug 30 07:37:18 2021 +0000 |
tree | e78c86f0d881751c49a350b7b4f62f816827461a | |
parent | 3287be05b0b600b55a626f230c9304cda6965afc [diff] | |
parent | 5931842bd6eb480b4fd782389f85ea3574a49b0c [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/cesu8 am: 72c13873b4 am: 5931842bd6 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cesu8/+/1811809 Change-Id: I72cce564e127143118f921492ed2c2274696501f
Convert between ordinary UTF-8 and CESU-8 encodings.
CESU-8 encodes characters outside the Basic Multilingual Plane as two UTF-16 surrogate chacaters, which are then further re-encoded as invalid, 3-byte UTF-8 characters. This means that 4-byte UTF-8 sequences become 6-byte CESU-8 sequences.
Note that CESU-8 is only intended for internal use within tightly-coupled systems, and not for data interchange.
This encoding is sometimes needed when working with Java, Oracle or MySQL, and when trying to store emoji, hieroglyphs, or other characters on the Supplementary Multilingual Plane or the Supplementary Ideographic Plane.
Some of this code is adapted from Rust's src/libcore/str.rs
file. This code is covered by LICENSE-RUST.txt and copyright by The Rust Project Developers and individual Rust contributors, as described in that file.
The new code in this project is distributed under the same terms.