fix mojibake reversion in display of utf8
authorJoey Hess <joeyh@joeyh.name>
Wed, 12 Apr 2023 17:48:21 +0000 (13:48 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 12 Apr 2023 17:53:30 +0000 (13:53 -0400)
commita576fc3b1272cfb1b015acb5e46712c992483fa9
treebd45b4fbecf0b22461520ba7ef938d1a3ed90ac0
parentc50aa21d5f1468fb54d5e8d65455446897443054
fix mojibake reversion in display of utf8

When displaying a ByteString like "💕", safeOutput operates on
individual bytes like "\240\159\146\149" and isControl '\146' = True,
so it got truncated to just "\240".

So, only treat the low control characters, and DEL, as control
characters.

Also split Utility.Terminal out of Utility.SafeOutput. The latter needs
win32, but Utility.SafeOutput is used by Control.Exception, which is
used by Setup.

Sponsored-by: Nicholas Golder-Manning on Patreon
Annex/UntrustedFilePath.hs
Command/ExamineKey.hs
Command/Find.hs
Command/FindKeys.hs
Utility/SafeOutput.hs
Utility/Terminal.hs [new file with mode: 0644]
git-annex.cabal