tag | 6f89dc8b2ef6a37705bfd134e9081149f48af800 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Oct 07 01:16:06 2024 -0700 |
object | 8c6ebbd07f71b0e4ee600fb8fb6aa4dd8646a604 |
Android Security 13.0.0 Release 22 (12199512)
commit | 8c6ebbd07f71b0e4ee600fb8fb6aa4dd8646a604 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 02:06:49 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 02:06:49 2021 +0000 |
tree | ca9ba939281ce1cdb13491031e734ceb300d9940 | |
parent | 5dd14ff1b8ee7f129a2340e73c3674587476e29a [diff] | |
parent | 9e01c27a0959bb188c699f3e0303c2fe944ee7a9 [diff] |
Snap for 8006021 from 9e01c27a0959bb188c699f3e0303c2fe944ee7a9 to tm-release Change-Id: I30fe94572d85c4c3950f46c50b20ba3785281784
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.