truncateLine could cut a surrogate pair when the maxChars boundary fell between a high surrogate and its paired low surrogate, producing a broken unpaired surrogate in grep tool output.