Thema: unicode
-
Unicode vor dem Vergleich von Bezeichnern normalisieren
Eine Normalisierungsrichtlinie für menschenlesbare Bezeichner wählen, ohne opake Tokens zu verändern oder optisch ähnliche Zeichen gleichzusetzen.
-
Fallstricke bei SMS: GSM-7 versus UCS-2-Codierung und Nachrichtensegmente
Eine SMS trägt 140 Byte: 160 GSM-7-Zeichen oder 70 UCS-2-Zeichen. Ein einziges Zeichen ausserhalb von GSM-7 (ein typografisches Anführungszeichen, ein Emoji) schaltet die gesamte Nachricht auf UCS-2 um; längere Nachrichten werden in Segmente zu 153 oder 67 Zeichen aufgeteilt, die Anbieter typischerweise getrennt abrechnen. Vor dem Versand Segmente zählen und Satzzeichen normalisieren.
-
Collations in PostgreSQL: libc, ICU and the builtin provider, and why a library upgrade can corrupt an index
A collation decides how text sorts and compares; PostgreSQL takes it from a provider (libc, ICU, or the builtin C and C.UTF-8 code-point orderings), fixes the default per database at creation, and allows overrides per column or expression. Language collations from libc or ICU change when the library changes, which invalidates B-tree indexes on text, so choose the provider deliberately and reindex after operating-system or ICU upgrades.
-
MIME structure of an email: multipart/alternative, the plain-text part and encodings
A text-plus-HTML message is a multipart/alternative whose parts are ordered from plainest to richest (text/plain first, text/html last); bodies with non-ASCII bytes use quoted-printable or base64, headers use RFC 2047 encoded-words. Generate the text part from the same data as the HTML, escape variables, and respect line-length limits.
Maschinenlesbar: JSON