You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving run text that contains a lone (unpaired) surrogate throws in TsString normalization #412
A run whose text contains an unpaired UTF-16 surrogate cannot be saved: TsString.get_NormalizedForm throws (via EnumerateSegmentLimits → char.ConvertToUtf32) before the serializer runs. Pasted or imported text can carry such characters.
Found while working on #410, which strips unpaired surrogates from string properties (TsStringSerializer.GetXmlSafeText) but cannot reach this path.
Repro: create a TsString with text "a\uD800b" and serialize it with TsStringSerializer.
Suggested fix: make normalization tolerate unpaired surrogates (pass them through or replace with U+FFFD) and strip them on write as #410 does for string properties; add a test.
Activity
Replace lone surrogates with U+FFFD on input instead of dropping them…