From e14e2a6528364c37fdec8181395f5b627a1454a0 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Mon, 14 Mar 2022 13:10:02 +0100 Subject: [PATCH] ouroboros-network-framework: utf8 characters are not always well supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On nix and Windows the following error can be observed ``` : commitBuffer: invalid argument (invalid character) ``` This is misconfiguration of the locale, but the easiest way to fix it is to avoid the `→` character all together. --- .../src/Ouroboros/Network/ConnectionManager/Types.hs | 2 +- .../test/Test/Ouroboros/Network/Server2.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Types.hs b/ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Types.hs index f9517a42914..36430050d04 100644 --- a/ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Types.hs +++ b/ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Types.hs @@ -874,7 +874,7 @@ instance Show state => Show (Transition' state) where show Transition { fromState, toState } = concat [ show fromState - , " → " + , " -> " , show toState ] diff --git a/ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs b/ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs index e07699da519..d8fb3fb478a 100644 --- a/ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs +++ b/ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs @@ -3695,7 +3695,7 @@ splitRemoteConns = ppTransition :: AbstractTransition -> String ppTransition Transition {fromState, toState} = - printf "%-30s → %s" (show fromState) (show toState) + printf "%-30s -> %s" (show fromState) (show toState) ppScript :: (Show peerAddr, Show req) => MultiNodeScript peerAddr req -> String ppScript (MultiNodeScript script _) = intercalate "\n" $ go 0 script