Download raw body.
tog: fix display of lines ending in \r\n
On Thu, Dec 10, 2020 at 10:44:34PM +0100, Christian Weisgerber wrote: > Stefan Sperling: > > > I plan to switch from fparseln(3) to getline(3) eventually, which > > will keep \n intact. (This patch was extracted out of a larger > > patch that converts tog to getline(3), which isn't finished yet.) > > I see. ok Thanks :) I have posted my getline patch now, it depends on this fix. > > > It made me curious how got & tog deal with terminal control sequences > > > in commit messages and blobs. > > > * tog escapes them (where??), but gets confused about the line length. > > > > Likely happens when tog converts to wide charactors so ncurses can > > display UTF-8 text? Non-UTF-8 data gets run through strvis in mbs2ws(). > > An ESC character is valid UTF-8. I can't find any call to strvis() > or the like. I misremembered the facts. I meant got_mbsavis() which detects invalid UTF-8 and replaces such bytes with '?' (recall that on OpenBSD UTF-8 is the only available multi-byte encoding; this might be different on FreeBSD). What specific problem are you looking at?
tog: fix display of lines ending in \r\n