commit | 553993eb332ba470e973378f2727bfea92520528 | [log] [tgz] |
---|---|---|
author | James Farrell <jamesfarrell@google.com> | Wed Aug 07 15:39:38 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Aug 07 15:39:38 2024 +0000 |
tree | 6aefb942c72b8962fff3aaef81a5d856979a0b8f | |
parent | 334df03b1645816d163d9750bab635b9443488f1 [diff] | |
parent | 7ebe55f85dc6a221c658da0f45b764c367b81015 [diff] |
Update Android.bp by running cargo_embargo am: 7ebe55f85d Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cesu8/+/3208910 Change-Id: Ifafeab884e8661353aa438dcd6e2a90725c471e9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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.