Skip to content

Commit

Permalink
Merge pull request #2917 from unisonweb/topic/cp65001
Browse files Browse the repository at this point in the history
switch to Windows code page 65001 in exe:unison and exe:tests
  • Loading branch information
pchiusano authored Feb 18, 2022
2 parents 9eeb98f + 87e58af commit 1a92f2a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions unison-cli/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ library:
tests:
tests:
dependencies:
- code-page
- easytest
- here
- shellmet
Expand All @@ -65,6 +66,7 @@ executables:
main: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-I0 -optP-Wno-nonportable-include-path
dependencies:
- code-page
- optparse-applicative >= 0.16.1.0
- shellmet
- template-haskell
Expand Down
3 changes: 2 additions & 1 deletion unison-cli/tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Main where
import EasyTest
import System.Environment (getArgs)
import System.IO
import System.IO.CodePage (withCP65001)
import qualified Unison.Test.ClearCache as ClearCache
import qualified Unison.Test.CommandLine as CommandLine
import qualified Unison.Test.GitSync as GitSync
Expand All @@ -20,7 +21,7 @@ test =
]

main :: IO ()
main = do
main = withCP65001 do
args <- getArgs
mapM_ (`hSetEncoding` utf8) [stdout, stdin, stderr]
case args of
Expand Down
2 changes: 2 additions & 0 deletions unison-cli/unison-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ executable unison
, async
, base
, bytestring
, code-page
, configurator
, containers >=0.6.3
, cryptonite
Expand Down Expand Up @@ -376,6 +377,7 @@ test-suite tests
, async
, base
, bytestring
, code-page
, configurator
, containers >=0.6.3
, cryptonite
Expand Down
3 changes: 2 additions & 1 deletion unison-cli/unison/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import System.Directory (canonicalizePath, getCurrentDirectory, removeDirectoryR
import System.Environment (getProgName, withArgs)
import qualified System.Exit as Exit
import qualified System.FilePath as FP
import System.IO.CodePage (withCP65001)
import System.IO.Error (catchIOError)
import qualified System.IO.Temp as Temp
import qualified System.Path as Path
Expand Down Expand Up @@ -67,7 +68,7 @@ import qualified Data.List.NonEmpty as NonEmpty
import Unison.CommandLine.Welcome (CodebaseInitStatus(..))

main :: IO ()
main = do
main = withCP65001 do
interruptHandler <- defaultInterruptHandler
withInterruptHandler interruptHandler $ do
progName <- getProgName
Expand Down

0 comments on commit 1a92f2a

Please sign in to comment.