Tag

UTF-16

0 views collected around this technical thread.

Architecture Digest
Architecture Digest
Jun 2, 2024 · Fundamentals

Understanding Unicode, UTF-16, and String Length Issues in JavaScript

This article explains why JavaScript string length behaves unexpectedly with Unicode characters, describes UTF‑16 encoding and surrogate pairs, and demonstrates ES6 techniques such as for‑of loops, spread syntax, the u regex flag, codePointAt, and normalize to handle Unicode correctly.

ES6JavaScriptProgramming Fundamentals
0 likes · 7 min read
Understanding Unicode, UTF-16, and String Length Issues in JavaScript
Sohu Tech Products
Sohu Tech Products
Dec 6, 2023 · Frontend Development

The Nuances of Base64 Encoding Strings in JavaScript

The article explains that JavaScript’s native btoa() and atob() functions only handle ASCII, so to correctly base64‑encode Unicode strings you must convert them with TextEncoder to UTF‑8 bytes, use Uint8Array, and decode with TextDecoder, while checking for malformed surrogate pairs via isWellFormed or encodeURIComponent to avoid silent data loss.

Base64JavaScriptTextDecoder
0 likes · 14 min read
The Nuances of Base64 Encoding Strings in JavaScript
Tencent Cloud Developer
Tencent Cloud Developer
May 17, 2022 · Fundamentals

A Comprehensive History and Overview of Character Encoding and Unicode

The article traces character encoding from early telegraph and Morse code through ASCII, ISO national sets and Chinese standards, explains Unicode’s unification and its UTF‑8/‑16/‑32 forms, and shows how modern languages—especially JavaScript—handle code points, highlighting the cultural and technical significance for developers.

ASCIIJavaScriptUTF-16
0 likes · 31 min read
A Comprehensive History and Overview of Character Encoding and Unicode
360 Tech Engineering
360 Tech Engineering
Apr 22, 2020 · Fundamentals

Understanding Unicode Encoding and Implementing Emoji Detection in Java

This article explains Unicode's structure, encoding ranges, UTF-8/16/32 representations, byte order considerations, and provides Java code to detect emojis in strings, illustrating practical usage of Unicode concepts for text processing.

JavaUTF-16UTF-8
0 likes · 14 min read
Understanding Unicode Encoding and Implementing Emoji Detection in Java
Huajiao Technology
Huajiao Technology
Apr 21, 2020 · Fundamentals

Understanding Unicode Encoding (UTF-8, UTF-16, UTF-32) and Emoji Detection in Java

This article explains the Unicode standard, its code planes and ranges, the three UTF encoding forms (UTF-8, UTF-16, UTF-32), compares their storage characteristics, discusses byte order marks, and provides Java code for detecting emoji characters in strings.

JavaUTF-16UTF-32
0 likes · 11 min read
Understanding Unicode Encoding (UTF-8, UTF-16, UTF-32) and Emoji Detection in Java
JD Tech
JD Tech
Dec 18, 2018 · Fundamentals

Understanding Character Encoding: Bits, Bytes, Unicode, UTF-8, UTF-16, and UTF-32

This article explains the origins of character sets, the relationships among various encodings such as ASCII, GB2312, GBK, GB18030, Unicode, UTF-8, UTF-16, and UTF-32, and shows how JavaScript handles Unicode and emoji characters, including practical code examples and solutions for length‑limited input fields.

JavaScriptUTF-16UTF-8
0 likes · 11 min read
Understanding Character Encoding: Bits, Bytes, Unicode, UTF-8, UTF-16, and UTF-32
Tencent Music Tech Team
Tencent Music Tech Team
Feb 9, 2018 · Mobile Development

Understanding String Encoding in Android JNI: From Native Crash to Source Code Analysis

This article investigates an Android JNI native crash caused by misusing NewString(), examines why a custom UTF‑8‑to‑UTF‑16 conversion was used instead of NewStringUTF(), compares Dalvik and ART string encodings, reveals a Dalvik UTF‑8 conversion bug fixed in ART, and advises developers on encoding nuances across Android versions.

AndroidDalvikJNI
0 likes · 26 min read
Understanding String Encoding in Android JNI: From Native Crash to Source Code Analysis