
#15021: ghc-pkg list crashes on Windows when unicode character is in the path ---------------------------------+---------------------------------------- Reporter: nh2 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: ghc-pkg | Version: 8.2.2 Resolution: | Keywords: Operating System: Windows | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10762 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by lehins): I can confirm this issue with Cyrillic characters on Windows 7 with latest GHC. If locale set to Russian through the control panel everything works fine, but changing the codepage does break {{{ghc-pkg}}} {{{ PS C:\Users\Алексей\ghc-8.4.2\bin> chcp 437 Active code page: 437 PS C:\Users\???????\ghc-8.4.2\bin> .\ghc-pkg.exe list C:\Users\ghc-pkg.exe: <stdout>: commitBuffer: invalid argument (invalid character) PS C:\Users\???????\ghc-8.4.2\bin> chcp 866 Active code page: 866 PS C:\Users\Алексей\ghc-8.4.2\bin> .\ghc-pkg.exe list C:\Users\Алексей\ghc-8.4.2\lib\package.conf.d Cabal-2.2.0.1 Win32-2.6.1.0 array-0.5.2.0 base-4.11.1.0 binary-0.8.5.1 bytestring-0.10.8.2 containers-0.5.11.0 deepseq-1.4.3.0 directory-1.3.1.5 filepath-1.4.2 (ghc-8.4.2) ghc-boot-8.4.2 ghc-boot-th-8.4.2 ghc-compact-0.1.0.0 ghc-prim-0.5.2.0 ghci-8.4.2 haskeline-0.7.4.2 hpc-0.6.0.3 integer-gmp-1.0.2.0 mtl-2.2.2 parsec-3.1.13.0 pretty-1.1.3.6 process-1.6.3.0 rts-1.0 stm-2.4.5.0 template-haskell-2.13.0.0 text-1.2.3.0 time-1.8.0.2 transformers-0.5.5.0 xhtml-3000.2.2.1 PS C:\Users\Алексей\ghc-8.4.2\bin> }}} Curiously, setting {{{chcp 65001}}} when locale is already set to Russian through the control panel results in a powershell crash, but not when locale is English(United States). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15021#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler