mirror of
https://github.com/storytold/indd-utils.git
synced 2026-11-19 16:50:48 +01:00
Text records count UTF-16 code units, but style runs, owned items and text owners count a surrogate pair as one position. Convert those positions to UTF-16 offsets so characters outside the Basic Multilingual Plane keep their formatting and are not split into two replacement characters.