Ticket #856 (new defect)

Opened 2 years ago

Last modified 13 months ago

windows unicode problem with cabal list

Reported by: guest Owned by:
Priority: normal Milestone: cabal-install-0.16
Component: cabal-install tool Version: 1.10.1.0
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform: Windows

Description

C:\>cabal list dedukti

* dedukti

Synopsis: A type-checker for the cabal.EXE: <stdout>: invalid argument

 http://hackage.haskell.org/packages/archive/dedukti/1.1.4/dedukti.cabal

"A type-checker for the λΠ-modulo calculus."

Change History

Changed 2 years ago by duncan

  • summary changed from cabal list UTF-8 problem to windows unicode problem with cabal list

Hmm, apparently the default locale on Windows is not Unicode capable. That seems odd actually.

We'll need to take this up with the ghc devs.

Changed 2 years ago by batterseapower

The default console locale on Windows is CP850 which is most certainly not a Unicode superset. Try running "cabal list" from e.g. Cygwin's Mintty in a Unicode locale and you should get the right output.

Perhaps we could change the default CodingFailureMode? used to write to std{out,err} to TransliterateCodingFailure?, which would replace the invalid characters with "?". I'm just concerned that this might not be the right thing to do for all Haskell programs.

Changed 2 years ago by duncan

Ah ok, so perhaps we should just set that on stdout for the appropriate cabal commands. Have to think about what to do for --simple-output and similar flags designed for machine readable output. Tricky thing is that if they're consumed by a program or directed to a file then we almost certainly want utf8. If it's printed to the screen then we want the locale encoding and the forgiving ??? conversion mode.

So ideally we'd just set this once in main in cabal & Setup.hs and have the machine readable output commands do something special.

Changed 15 months ago by kosmikus

  • milestone set to cabal-install-0.14

Changed 15 months ago by kosmikus

Also see #885.

Changed 13 months ago by kosmikus

  • milestone changed from cabal-install-0.14 to cabal-install-0.16
Note: See TracTickets for help on using tickets.