mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
In UTF-16BE a newline is 00 0A, so the initial read_until(b'\n') usually already ends exactly at the end of line 1. The BE branch then always called read_utf16_line, which read on to the next newline, merging lines 1 and 2. Only keep reading when the first read did not end on a complete 00 0A. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVn4SeAXPsUajXT2rtHQfo