[Bug 264559] unexpand: nonconformantly (to both POSIX and heirloom) replaces single spaces with tabs, sometimes breaking reversibility

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 09 Jun 2022 17:24:17 UTC

--- Comment #2 from наб <nabijaczleweli@nabijaczleweli.xyz> ---
Some more, this time /exorbitantly/ broken:
  printf ' ermrxsmg \tjrjc ngsoo\n' | unexpand -t2          | cat -A
  printf ' ermrxsmg \tjrjc ngsoo\n' | unexpand -t4,55,68,78 | cat -A
  | ermrxsmg^I^Ijrjc ngsoo$
whereas the correct output is
  | ermrxsmg ^Ijrjc ngsoo$
  | ermrxsmg ^Ijrjc ngsoo$

After reexpansion, the first one is fine:
  | ermrxsmg   jrjc ngsoo$
but the second one very obviously isn't:
  |    ermrxsmg                                           jrjc         ngsoo$

You are receiving this mail because:
You are the assignee for the bug.